The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A193995 Maximum number of terms required to determine whether a number is happy or not (A007770 or A031177). 2
1, 9, 13, 8, 12, 17, 6, 13, 12, 2, 10, 13, 3, 14, 11, 8, 13, 11, 5, 8, 13, 14, 4, 9, 11, 10, 14, 4, 10, 13, 3, 4, 12, 12, 13, 16, 8, 10, 13, 9, 14, 8, 12, 5, 15, 12, 11, 14, 5, 12, 11, 11, 13, 15, 13, 10, 12, 8, 10, 17, 9, 10, 16, 12, 10, 15, 10, 3, 13, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The number 1 is the only term requiring just one term to determine if it is happy. Although the b-file appears to show that there are only a few numbers having 8 terms, see A193996 for more beginning at 78999.
LINKS
EXAMPLE
For n=2, a(n)=9 because the iterations are 2, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16,...
MATHEMATICA
f[n_] := Total[IntegerDigits[n]^2]; Table[Length[NestWhileList[f, n, UnsameQ, All]] - 1, {n, 100}]
CROSSREFS
Sequence in context: A273614 A281224 A050236 * A070607 A340490 A335662
KEYWORD
nonn,base
AUTHOR
T. D. Noe, Aug 23 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 June 7 20:29 EDT 2024. Contains 373206 sequences. (Running on oeis4.)