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!)
A121879 a(n) = Fibonacci(n-1)*a(n-1) - a(n-2), with a(1)=0, a(2)=1. 1

%I #22 Sep 08 2022 08:45:27

%S 0,1,1,1,2,9,70,901,18851,640033,35182964,3130643763,450777518908,

%T 105028031261801,39595117008180069,24152916346958580289,

%U 23838888839331110565174,38070681323495436614002589,98374616701023368879472124802,411304234356297381789636339794573

%N a(n) = Fibonacci(n-1)*a(n-1) - a(n-2), with a(1)=0, a(2)=1.

%H G. C. Greubel, <a href="/A121879/b121879.txt">Table of n, a(n) for n = 1..99</a>

%p with(combinat);

%p a:= proc(n) option remember;

%p if n < 3 then n-1

%p else fibonacci(n-1)*a(n-1) - a(n-2)

%p fi;

%p end proc;

%p seq(a(n), n = 1..30); # _G. C. Greubel_, Oct 08 2019

%t 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 *)

%t 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 *)

%o (Python)

%o from sympy import fibonacci, cacheit

%o @cacheit

%o def A121879(n):

%o if n <= 2: return n-1

%o else: return fibonacci(n-1)*A121879(n-1)-A121879(n-2)

%o print([A121879(n) for n in range(1, 25)]) # Oct 14 2009; modified by _G. C. Greubel_, Oct 08 2019

%o (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

%o (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

%o (Sage)

%o @CachedFunction

%o def a(n):

%o if (n<3): return n-1

%o else: return fibonacci(n-1)*a(n-1) - a(n-2)

%o [a(n) for n in (1..25)] # _G. C. Greubel_, Oct 08 2019

%o (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

%Y Cf. A000045, A058798.

%K nonn

%O 1,5

%A _Roger L. Bagula_ and _Gary W. Adamson_, Sep 09 2006

%E Definition clarified - The Assoc. Editors of the OEIS, Oct 14 2009

%E More terms added by _G. C. Greubel_, Oct 08 2019

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 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)