login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A193570 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 145. 0
77, 98, 145, 149, 194, 238, 283, 289, 298, 328, 358, 382, 385, 419, 456, 465, 491, 538, 546, 564, 583, 645, 654, 678, 687, 707, 768, 770, 786, 789, 798, 809, 823, 829, 832, 835, 853, 867, 876, 879, 890, 892, 897, 908, 914, 928, 941, 978, 980, 982, 987 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..51.

Weisstein, Eric E.: MathWorld -- Unhappy Number.

EXAMPLE

25889 is such a number of height 4 because it enters the cycle at 145 in 4 steps: 25889 -> 238 -> 77 -> 98 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> ...

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=145 then a:=[op(a), i] fi; od: print(op(a));

CROSSREFS

Cf. A031177, A039943.

Sequence in context: A064902 A247682 A127335 * A154534 A235867 A274967

Adjacent sequences:  A193567 A193568 A193569 * A193571 A193572 A193573

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 18:22 EDT 2019. Contains 327082 sequences. (Running on oeis4.)