From Wikipedia, the free encyclopedia:

 A happy number is defined by the following process:
 Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals   1   (where it will stay),   or it loops endlessly in a cycle which does not include   1.   


 Those numbers for which this process end in   1   are       happy   numbers,   
 while   those numbers   that   do   not   end in   1   are   unhappy   numbers. 


Task

Find and print the first   8   happy numbers.

Display an example of your output here on this page.



See also

   The OEIS entry:   The     happy numbers:   A007770
   The OEIS entry:   The unhappy numbers;   A031177


OBTW 
  Happy Numbers Rosetta Code task in LOLCODE
  Requires 1.3 for BUKKIT availability
TLDR
HAI 1.3
CAN HAS STDIO?
 
BTW Simple list implementation.  
BTW Used for the list of numbers already seen in IZHAPPY
 
BTW Create a list
HOW IZ I MAEKLIST 
  I HAS A LIST ITZ A BUKKIT
  LIST HAS A LENGTH ITZ 0
  FOUND YR LIST
IF U SAY SO
 
BTW Append an item to list
HOW IZ I PUTIN YR LIST AN YR ITEM
  LIST HAS A SRS LIST'Z LENGTH ITZ ITEM
  LIST'Z LENGTH R SUM OF LIST'Z LENGTH AN 1
IF U SAY SO
 
BTW Check for presence of an item in the list
HOW IZ I DUZLISTHAS YR HAYSTACK AN YR NEEDLE
  IM IN YR BARN UPPIN YR INDEX WILE DIFFRINT INDEX AN HAYSTACK'Z LENGTH
    I HAS A ITEM ITZ HAYSTACK'Z SRS INDEX
    BOTH SAEM ITEM AN NEEDLE
    O RLY?
      YA RLY
        FOUND YR WIN
    OIC
  IM OUTTA YR BARN
  FOUND YR FAIL
IF U SAY SO
 
BTW Calculate the next number using the happy formula
HOW IZ I HAPPYSTEP YR NUM
  I HAS A NEXT ITZ 0
  IM IN YR LOOP 
    BOTH SAEM NUM AN 0
    O RLY?
      YA RLY
        GTFO
    OIC
    I HAS A DIGIT ITZ MOD OF NUM AN 10
    NUM R QUOSHUNT OF NUM AN 10
    I HAS A SQUARE ITZ PRODUKT OF DIGIT AN DIGIT
    NEXT R SUM OF NEXT AN SQUARE
  IM OUTTA YR LOOP
  FOUND YR NEXT
IF U SAY SO
 
BTW Check to see if a number is happy
HOW IZ I IZHAPPY YR NUM
  I HAS A SEENIT ITZ I IZ MAEKLIST MKAY
  IM IN YR LOOP 
    BOTH SAEM NUM AN 1
    O RLY?
      YA RLY   
        FOUND YR WIN
    OIC
    I IZ DUZLISTHAS YR SEENIT AN YR NUM MKAY
    O RLY?
      YA RLY
        FOUND YR FAIL
    OIC
    I IZ PUTIN YR SEENIT AN YR NUM MKAY
    NUM R I IZ HAPPYSTEP YR NUM MKAY
  IM OUTTA YR LOOP
IF U SAY SO
 
BTW Print out the first 8 happy numbers
I HAS A KOUNT ITZ 0
IM IN YR LOOP UPPIN YR NUM WILE DIFFRINT KOUNT AN 8
  I IZ IZHAPPY YR NUM MKAY
  O RLY?
    YA RLY
      KOUNT R SUM OF KOUNT AN 1
      VISIBLE NUM
  OIC
IM OUTTA YR LOOP
KTHXBYE