|
|
A001054
|
|
a(n) = a(n-1)*a(n-2) - 1.
|
|
1
|
|
|
0, 1, -1, -2, 1, -3, -4, 11, -45, -496, 22319, -11070225, -247076351776, 2735190806339469599, -675800965841611881515781657825, -1848444588685310753420392017318175868503407962176
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
MAPLE
|
a:= proc (n) option remember;
if n<2 then n
else a(n-1)*a(n-2) - 1
end if
end proc;
|
|
MATHEMATICA
|
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]*a[n-2] -1}, a, {n, 0, 15}] (* G. C. Greubel, Sep 20 2019 *)
|
|
PROG
|
(PARI) m=15; v=concat([0, 1], vector(m-2)); for(n=3, m, v[n]=v[n-1]*v[n-2] -1 ); v \\ G. C. Greubel, Sep 20 2019
(Magma) I:=[0, 1]; [n le 2 select I[n] else Self(n-1)*Self(n-2) -1: n in [1..15]]; // G. C. Greubel, Sep 20 2019
(Sage)
def a(n):
if (n<2): return n
else: return a(n-1)*a(n-2) -1
(GAP) a:=[0, 1];; for n in [3..15] do a[n]:=a[n-1]*a[n-2] -1; od; a; # G. C. Greubel, Sep 20 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|