login
A121879
a(n) = Fibonacci(n-1)*a(n-1) - a(n-2), with a(1)=0, a(2)=1.
1
0, 1, 1, 1, 2, 9, 70, 901, 18851, 640033, 35182964, 3130643763, 450777518908, 105028031261801, 39595117008180069, 24152916346958580289, 23838888839331110565174, 38070681323495436614002589, 98374616701023368879472124802, 411304234356297381789636339794573
OFFSET
1,5
LINKS
MAPLE
with(combinat);
a:= proc(n) option remember;
if n < 3 then n-1
else fibonacci(n-1)*a(n-1) - a(n-2)
fi;
end proc;
seq(a(n), n = 1..30); # G. C. Greubel, Oct 08 2019
MATHEMATICA
RecurrenceTable[{a[1]==0, a[2]==1, a[n]==Fibonacci[n-1]a[n-1]-a[n-2]}, a[n], {n, 25}] (* Harvey P. Dale, Aug 14 2011 *)
a[n_]:= a[n]= If[n<3, n-1, Fibonacci[n-1]*a[n-1]-a[n-2]]; Table[a[n], {n, 25}] (* G. C. Greubel, Oct 08 2019 *)
PROG
(Python)
from sympy import fibonacci, cacheit
@cacheit
def A121879(n):
if n <= 2: return n-1
else: return fibonacci(n-1)*A121879(n-1)-A121879(n-2)
print([A121879(n) for n in range(1, 25)]) # Oct 14 2009; modified by G. C. Greubel, Oct 08 2019
(PARI) my(m=25, v=concat([0, 1], vector(m-2))); for(n=3, m, v[n] = fibonacci(n-1)*v[n-1] - v[n-2]); v \\ G. C. Greubel, Oct 08 2019
(Magma) [n lt 3 select n-1 else Fibonacci(n-1)*Self(n-1) - Self(n-2): n in [1..25]]; // G. C. Greubel, Oct 08 2019
(Sage)
@CachedFunction
def a(n):
if (n<3): return n-1
else: return fibonacci(n-1)*a(n-1) - a(n-2)
[a(n) for n in (1..25)] # G. C. Greubel, Oct 08 2019
(GAP) a:=[0, 1];; for n in [3..25] do a[n]:=Fibonacci(n-1)*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Oct 08 2019
CROSSREFS
Sequence in context: A177450 A193469 A336606 * A118789 A258114 A349583
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition clarified - The Assoc. Editors of the OEIS, Oct 14 2009
More terms added by G. C. Greubel, Oct 08 2019
STATUS
approved