The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A193572 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 20. 0
 20, 24, 204, 224, 240, 242, 402, 420, 422, 1133, 1313, 1331, 2004, 2024, 2040, 2042, 2204, 2240, 2400, 2402, 2420, 3113, 3131, 3311, 4002, 4020, 4022, 4200, 4202, 4220, 4899, 4989, 4998, 5779, 5797, 5977, 7579, 7597, 7759, 7795, 7957, 7975, 8499, 8949, 8994 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Weisstein, Eric E.: MathWorld -- Unhappy Number. EXAMPLE 4899 is such a number of height 3 because it enters the cycle at 20 in 3 steps: 4899 -> 242 -> 24 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> ... MAPLE S:=proc(n) local Q, k, N, z; Q:=[n]; for k from 1 do N:=convert(Q[k], base, 10); z:=sum(N['i']^2, 'i'=1..nops(N)); if not member(z, Q) then Q:=[op(Q), z]; else Q:=[op(Q), z]; break; fi; od; return Q; end: a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=20 then a:=[op(a), i] fi; od: print(op(a)); CROSSREFS Cf. A031177, A039943. Sequence in context: A263016 A107302 A219392 * A167323 A112819 A070684 Adjacent sequences:  A193569 A193570 A193571 * A193573 A193574 A193575 KEYWORD nonn,base AUTHOR Martin Renner, Jul 31 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 4 11:01 EDT 2021. Contains 346447 sequences. (Running on oeis4.)