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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099645 Number of iterations until n reaches a number in A039943 under "x goes to sum of squares of digits of x" map. 14
0, 1, 5, 0, 4, 9, 5, 5, 4, 1, 2, 5, 2, 6, 3, 0, 5, 3, 4, 0, 5, 6, 3, 1, 3, 2, 6, 3, 2, 5, 2, 3, 4, 4, 5, 8, 0, 2, 5, 1, 6, 0, 4, 4, 7, 4, 3, 6, 4, 4, 3, 3, 5, 7, 5, 2, 4, 0, 2, 9, 1, 2, 8, 4, 2, 7, 2, 2, 5, 5, 5, 6, 1, 3, 4, 2, 2, 4, 3, 5, 3, 3, 2, 6, 1, 2, 4, 7, 0, 4, 4, 2, 5, 4, 2, 5, 3, 1, 8, 1, 2, 5, 2, 6, 3 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

COMMENTS

Length of transient when the f[n]=Sum[digit^2 of n] function is iterated.

In A031176 including cycle lengths[=c] of this iteration only c=1 and c=8 occur. A007770 lists cases of c=1, the happy numbers.

REFERENCES

A. Porges, A set of eight numbers, Amer. Math. Monthly, 52 (1945), 379-382. [From M. F. Hasler (www.univ-ag.fr/~mhasler), May 24 2009]

Hugo Steinhaus: "Sto zadan" (1958), "One Hundred Problems in Elementary Mathematics" (1964), problem 2. [From M. F. Hasler (www.univ-ag.fr/~mhasler), May 24 2009]

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

EXAMPLE

n=99999999999: iteration-list={99999999999,891,146,53,34,25,29,85,89,145,42,20,[4,16,37,58,

89,145,42,20],4,...]}.Lengths of transient=12, of cycle=8.

MATHEMATICA

fu[x_] :=Apply[Plus, IntegerDigits[x]^2]; hs=20; transient lengths are obtained by: a[n_] :=-1+Min[Flatten[Position[NestList[fu, n, Length[Union[NestList[fu, n, hs]]]] -Last[NestList[fu, n, Length[Union[NestList[fu, n, hs]]]]], 0]]], {n, 1, 256}];

PROG

(PARI) A099645(n)={ local( c=0, S=Set([1, 4, 16, 37, 58, 89, 145, 42, 20])); while( !setsearch(S, n), n=A003132(n); c++); c} [From M. F. Hasler (www.univ-ag.fr/~mhasler), May 24 2009]

(Haskell)

a099645 = length . takeWhile (`notElem` a039943_list) . iterate a003132

a099645_list = map a099645 [1..]

-- Reinhard Zumkeller, Aug 24 2011

CROSSREFS

Cf. A007700, A031176.

Cf. A000216, A003132, A003621

Cf. A039943, A031176, A007770, A000216 (orbit of 2), A000218 (orbit of 3), A080709 (orbit of 4), A000221 (orbit of 5), A008460 (orbit of 6), A008462 (orbit of 8), A008463 (orbit of 9), A139566 (orbit of 15), A122065 (orbit of 74169). [From M. F. Hasler (www.univ-ag.fr/~mhasler), May 24 2009]

Sequence in context: A198839 A062521 A157700 * A199092 A167260 A137520

Adjacent sequences:  A099642 A099643 A099644 * A099646 A099647 A099648

KEYWORD

base,nonn

AUTHOR

Labos E. (labos(AT)ana.sote.hu), Nov 08 2004

EXTENSIONS

Terms checked using the given PARI code. However, according to the domain of A003132 and the definition of A039943 (which both include 0), an initial a(0)=0 should be added here, too. [From M. F. Hasler (www.univ-ag.fr/~mhasler), May 24 2009]

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 15:39 EST 2012. Contains 205635 sequences.