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

%I #24 Jan 21 2024 03:21:25

%S 1,1,-1,-5,-35,-1315,-1733045,-3003450166025,

%T -9020712899804610407871655,

%U -81373261220701303171562403760549780420204382316935

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

%H G. C. Greubel, <a href="/A122590/b122590.txt">Table of n, a(n) for n = 1..14</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}]

%t nxt[{a_, b_}] := {b, 2 b - a - (b^2 + a^2)}; NestList[nxt,{1,1},10][[All,1]] (* _Harvey P. Dale_, Aug 15 2021 *)

%o (Magma)

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

%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;

%o end function;

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

%o (Sage) #a = A122590

%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. A122591, A122592, A122593.

%K sign

%O 1,4

%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 April 24 14:23 EDT 2024. Contains 371960 sequences. (Running on oeis4.)