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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A193569 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 89. 0
5, 6, 8, 12, 14, 17, 21, 22, 25, 27, 29, 34, 35, 36, 41, 43, 45, 46, 48, 50, 52, 53, 54, 55, 60, 63, 64, 66, 67, 71, 72, 76, 80, 84, 85, 89, 92, 99, 102, 104, 107, 112, 115, 118, 120, 121, 123, 124, 126, 127, 132, 135, 136, 140, 142, 146, 147, 151 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

Weisstein, Eric E.: MathWorld -- Unhappy Number

EXAMPLE

15999 is such a number of height 12 because it enters the cycle at 89 in 12 steps: 15999 -> 269 -> 121 -> 6 -> 36 -> 45 -> 41 -> 17 -> 50 -> 25 -> 29 -> 85 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> ...

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

CROSSREFS

Cf. A031177, A039943.

Sequence in context: A169622 A047321 A033158 * A032721 A105106 A140504

Adjacent sequences:  A193566 A193567 A193568 * A193570 A193571 A193572

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 August 3 22:03 EDT 2021. Contains 346441 sequences. (Running on oeis4.)