This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A163522 a(1)=2; for n>1, a(n) = sum of digits of a(n-1)^2. 2
 2, 4, 7, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16, 13, 16 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Antti Karttunen, Table of n, a(n) for n = 1..1001 Index entries for linear recurrences with constant coefficients, signature (0,1). FORMULA G.f.: x*(2 + 4*x + 5*x^2 + 9*x^3 + 9*x^4)/((1 - x)*(1 + x)). - Bruno Berselli, May 29 2014 EXAMPLE a(2)=4  because 2^2=4; a(3)=7  because 4^2=16 and 6+1=7; a(4)=13 because 7^2=49 and 4+9=13. Other similar sequences, starting from 3, 5, 7 respectively: . 3, 9 (9 repeated); . 5, 7, 13, 16, 13 (13, 16 repeated); . 8, 10, 1 (1 repeated). MATHEMATICA Join[{2, 4, 7}, LinearRecurrence[{0, 1}, {13, 16}, 50]] (* or *) CoefficientList[Series[x*(2 + 4*x + 5*x^2 + 9*x^3 + 9*x^4)/((1 - x)*(1 + x)), {x, 0, 50}], x]  (* G. C. Greubel, Jul 27 2017 *) PROG (PARI) x='x+O('x^50); Vec(x*(2 + 4*x + 5*x^2 + 9*x^3 + 9*x^4)/((1 - x)*(1 + x))) \\ G. C. Greubel, Jul 27 2017 (Scheme) (define (A163522 n) (cond ((<= n 2) (expt 2 n)) ((= 3 n) 7) ((even? n) 13) (else 16))) ;; Antti Karttunen, Sep 14 2017 CROSSREFS Cf. A007953. Sequence in context: A177101 A018414 A002152 * A255173 A002466 A162842 Adjacent sequences:  A163519 A163520 A163521 * A163523 A163524 A163525 KEYWORD nonn,base,easy AUTHOR Vincenzo Librandi, Jul 30 2009 EXTENSIONS Edited by N. J. A. Sloane, Aug 01 2009 Edited by Bruno Berselli, May 29 2014 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 July 22 10:03 EDT 2019. Contains 325219 sequences. (Running on oeis4.)