The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A139566 a(n) is the sum of squares of digits of a(n-1); a(1)=15. 13
 15, 26, 40, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Colin Barker, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 1). FORMULA Eventually periodic with period 8. a(n) = (1/224)*(3295*(n mod 8) - 1157*((n+1) mod 8) - 457*((n+2) mod 8) - 177*((n+3) mod 8) - 177*((n+4) mod 8) + 75*((n+5) mod 8) + 859*((n+6) mod 8) + 1027*((n+7) mod 8)) - 27*(C(2*n,n) mod 2) + 6*(C((n+1)^2,n+3) mod 2) + 36*(C(n^2,n+2) mod 2), with n >= 0. - Paolo P. Lava, Jul 07 2008 a(n) = A008463(n) for n > 4. - M. F. Hasler, May 24 2009 a(n) = a(n-8) for n > 11. - Colin Barker, Aug 24 2015 G.f.: x*(36*x^10 + 6*x^9 - 27*x^8 - 145*x^7 - 89*x^6 - 58*x^5 - 37*x^4 - 16*x^3 - 40*x^2 - 26*x - 15) / ((x-1)*(x+1)*(x^2+1)*(x^4+1)). - Colin Barker, Aug 24 2015 MATHEMATICA a = {15}; Do[AppendTo[a, Plus @@ (IntegerDigits[a[[ -1]]]^2)], {70}]; a (* Stefan Steinerberger, Jun 14 2008 *) NestList[Total[IntegerDigits[#]^2] &, 15, 70] (* or *) PadRight[ {15, 26, 40}, 70, {42, 20, 4, 16, 37, 58, 89, 145}](* Harvey P. Dale, Jan 28 2013 *) PROG From M. F. Hasler, May 24 2009: (Start) (PARI) /* to check the given terms */ a=[/* paste the terms here */]; a==vector(#a, n, k=if(n>1, A003132(k), 15)) /* to check the following code, use: a==vector(99, n, A139566(n)) */ A139566(n)=[15, 26, 40, 16, 37, 58, 89, 145, 42, 20, 4][if(n>11, (n-4)%8+4, n)] \\ (End) (PARI) Vec(x*(36*x^10+6*x^9-27*x^8-145*x^7-89*x^6-58*x^5-37*x^4-16*x^3 -40*x^2-26*x-15)/((x-1)*(x+1)*(x^2+1)*(x^4+1)) + O(x^70)) \\ Colin Barker, Aug 24 2015 CROSSREFS Cf. A101926, A087965, A074411, A110998, A051861, A048222. Cf. A003132 (the iterated map), A003621, A039943, A099645, A031176, A007770, A000216 (starting with 2), A000218 (starting with 3), A080709 (starting with 4), A000221 (starting with 5), A008460 (starting with 6), A008462 (starting with 8), A008463 (starting with 9), A122065 (starting with 74169). - M. F. Hasler, May 24 2009 Sequence in context: A050700 A263108 A274182 * A097963 A063936 A240914 Adjacent sequences:  A139563 A139564 A139565 * A139567 A139568 A139569 KEYWORD base,nonn,easy AUTHOR Robert Gornall (rob(AT)khobbits.net), Jun 11 2008 EXTENSIONS More terms from Stefan Steinerberger, Jun 14 2008 Terms checked, using the given PARI code, by M. F. Hasler, May 24 2009 Minor edits and starting value added in name by M. F. Hasler, Apr 27 2018 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.

Last modified January 29 16:58 EST 2020. Contains 331347 sequences. (Running on oeis4.)