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

 

Logo


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

%I

%S 2,4,7,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,

%T 16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,

%U 13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16,13,16

%N a(1)=2; for n>1, a(n) = sum of digits of a(n-1)^2.

%H Antti Karttunen, <a href="/A163522/b163522.txt">Table of n, a(n) for n = 1..1001</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).

%F G.f.: x*(2 + 4*x + 5*x^2 + 9*x^3 + 9*x^4)/((1 - x)*(1 + x)). - _Bruno Berselli_, May 29 2014

%e a(2)=4 because 2^2=4;

%e a(3)=7 because 4^2=16 and 6+1=7;

%e a(4)=13 because 7^2=49 and 4+9=13.

%e Other similar sequences, starting from 3, 5, 7 respectively:

%e . 3, 9 (9 repeated);

%e . 5, 7, 13, 16, 13 (13, 16 repeated);

%e . 8, 10, 1 (1 repeated).

%t 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 *)

%o (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

%o (Scheme) (define (A163522 n) (cond ((<= n 2) (expt 2 n)) ((= 3 n) 7) ((even? n) 13) (else 16))) ;; _Antti Karttunen_, Sep 14 2017

%Y Cf. A007953.

%K nonn,base,easy

%O 1,1

%A _Vincenzo Librandi_, Jul 30 2009

%E Edited by _N. J. A. Sloane_, Aug 01 2009

%E Edited by _Bruno Berselli_, May 29 2014

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 20 10:41 EDT 2019. Contains 326150 sequences. (Running on oeis4.)