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!)
A122593 a(n) = -a(n-1) + a(n-3) - (a(n-1) - a(n-2))^2 + (a(n-2) - a(n-3))^2. 4
1, 1, 1, 0, 0, 2, -6, -54, -2184, -4532418, -20523011025492, -421193795514716517978851412, -177404213380075544048510970681865493733941889439557930 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(n) = -a(n-1) + a(n-3) - (a(n-1) - a(n-2))^2 + (a(n-2) - a(n-3))^2, with a(1) = a(2) = a(3) = 1.
MATHEMATICA
a[n_]:= a[n]= If[n<4, 1, -a[n-1] +a[n-3] - (a[n-1] -a[n-2])^2 + (a[n-2] -a[n-3])^2];
Table[a[n], {n, 15}]
PROG
(Magma)
function a(n) // a = A122593
if n lt 4 then return 1;
else return -a(n-1) +a(n-3) -(a(n-1) -a(n-2))^2 +(a(n-2) -a(n-3))^2;
end if; return a; end function;
[a(n): n in [1..15]]; // G. C. Greubel, Nov 29 2021
(Sage)
@CachedFunction
def a(n): return 1 if (n<4) else -a(n-1) +a(n-3) -(a(n-1) -a(n-2))^2 +(a(n-2) -a(n-3))^2 # a = A122593
[a(n) for n in (1..15)] # G. C. Greubel, Nov 29 2021
CROSSREFS
Sequence in context: A152543 A279454 A306021 * A267348 A264610 A153450
KEYWORD
sign,changed
AUTHOR
Roger L. Bagula, Sep 19 2006
EXTENSIONS
Edited by N. J. A. Sloane, Sep 21 2006
Recurrence formula corrected by Georg Fischer, Apr 10 2024
STATUS
approved

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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)