login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A193568 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 58. 0
38, 58, 73, 83, 116, 119, 161, 166, 191, 235, 253, 299, 307, 308, 325, 352, 357, 370, 375, 380, 468, 486, 489, 498, 523, 532, 537, 573, 611, 616, 648, 661, 679, 684, 697, 703, 730, 735, 753, 769, 796, 803, 830, 846, 849, 864, 894, 911, 929, 948, 967, 976 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Unhappy Number.
EXAMPLE
468 is such a number of height 4 because it enters the cycle at 58 in 4 steps: 468 -> 116 -> 38 -> 73 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> ...
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=58 then a:=[op(a), i] fi; od: print(op(a));
CROSSREFS
Sequence in context: A098126 A244313 A147616 * A039466 A216140 A177044
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 1 09:59 EST 2024. Contains 370432 sequences. (Running on oeis4.)