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!)
A122591 a(n) = 2*a(n-1) - a(n-2) + (a(n-1)^2 + a(n-2)^2). 4

%I #15 Jan 21 2024 03:20:40

%S 1,1,3,15,261,68853,4740941175,22476523239032929731,

%T 505194096914787342916581691483319031273,

%U 255221075557547546310804864838512137564534415781651685947633570258183940865705

%N a(n) = 2*a(n-1) - a(n-2) + (a(n-1)^2 + a(n-2)^2).

%H G. C. Greubel, <a href="/A122591/b122591.txt">Table of n, a(n) for n = 1..13</a>

%F a(n) = 2*a(n-1) - a(n-2) + (a(n-1)^2 + a(n-2)^2), with a(1) = a(2) = 1.

%t a[n_]:= a[n]= If[n<3, 1, 2*a[n-1] -a[n-2] +(a[n-1]^2 + a[n-2]^2)];

%t Table[a[n], {n, 0, 10}]

%o (Magma)

%o function a(n) // a = A122591

%o if n lt 3 then return 1;

%o else return 2*a(n-1) -a(n-2) +(a(n-1)^2 +a(n-2)^2);

%o end if; return a; end function;

%o [a(n): n in [1..12]]; // _G. C. Greubel_, Nov 29 2021

%o (Sage)

%o #a = A122591

%o def a(n): return 1 if (n<3) else 2*a(n-1) -a(n-2) +(a(n-1)^2 +a(n-2)^2)

%o [a(n) for n in (1..12)] # _G. C. Greubel_, Nov 29 2021

%Y Cf. A122590, A122592, A122593.

%K nonn

%O 1,3

%A _Roger L. Bagula_, Sep 19 2006

%E Edited by _N. J. A. Sloane_, Sep 21 2006

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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)