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!)
A165902 a(0)=0, a(1)=1, a(n) = a(n-1) + 3^(n-3)*a(n-2). 2
0, 1, 1, 2, 5, 23, 158, 2021, 40415, 1513724, 89901329, 10021444493, 1779549303200, 593535825170357, 315835356239140757, 315745107820598835194, 503859317773076207957705, 1510702921925354866376968691, 7231341194731242966764145947126 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
MAPLE
q:=3; seq(add((product((1-q^(n-j-1-k))/(1-q^(k+1)), k=0..j-1))* q^(j*(j-1)), j = 0..floor((n-1)/2)), n = 0..20); # G. C. Greubel, Dec 19 2019
MATHEMATICA
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]+3^(n-3) a[n-2]}, a, {n, 20}] (* Harvey P. Dale, Oct 18 2014 *)
F[n_, q_]:= Sum[QBinomial[n-j-1, j, q]*q^(j*(j-1)), {j, 0, Floor[(n-1)/2]}]; Table[F[n, 3], {n, 0, 20}] (* G. C. Greubel, Dec 19 2019 *)
PROG
(PARI) a(n)=if(n<2, n, a(n-1)+3^(n-3)*a(n-2));
(Magma) q:=3; I:=[0, 1]; [n le 2 select I[n] else Self(n-1) + q^(n-3)*Self(n-2): n in [1..20]]; // G. C. Greubel, Dec 19 2019
(Sage)
def F(n, q): return sum( q_binomial(n-j-1, j, q)*q^(j*(j-1)) for j in (0..floor((n-1)/2)))
[F(n, 3) for n in (0..20)] # G. C. Greubel, Dec 19 2019
(GAP) q:=3;; a:=[0, 1];; for n in [3..20] do a[n]:=a[n-1]+q^(n-3)*a[n-2]; od; a; # G. C. Greubel, Dec 19 2019
CROSSREFS
Cf. A015460.
q-Fibonacci numbers: A000045 (q=1), A165901 (q=2), this sequence (q=3).
Sequence in context: A358608 A242227 A032182 * A191600 A343020 A167142
KEYWORD
nonn
AUTHOR
Jaume Oliver Lafont, Sep 29 2009
EXTENSIONS
a(18) from Harvey P. Dale, Oct 18 2014
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 July 14 05:06 EDT 2024. Contains 374291 sequences. (Running on oeis4.)