A015473 q-Fibonacci numbers for q=2, scale a(n-1).
0, 1, 2, 9, 74, 1193, 38250, 2449193, 313534954, 80267397417, 41097221012458, 42083634584154409, 86187324725569242090, 353023324159566199755049, 2891967157702491033962603498, 47381990264820937260009495466281
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..80
Crossrefs
Programs
-
GAP
q:=2;; a:=[0,1];; for n in [3..20] do a[n]:=q^(n-2)*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Dec 17 2019
-
Magma
[0] cat [n le 2 select n else 2^(n-1)*Self(n-1) + Self(n-2): n in [1..16]]; // Vincenzo Librandi, Nov 09 2012
-
Maple
q:=2; seq(add((product((1-q^(2*(n-j-1-k)))/(1-q^(2*k+2)), k=0..j-1))* q^binomial(n-2*j,2), j = 0..floor((n-1)/2)), n = 0..20); # G. C. Greubel, Dec 17 2019
-
Mathematica
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]*2^(n-1)+a[n-2]}, a, {n, 30}] (* Vincenzo Librandi, Nov 09 2012 *) Join[{0},Denominator[Table[FromContinuedFraction[2^Range[0,n]],{n,0,20}]]] (* Harvey P. Dale, Feb 09 2013 *) F[n_, q_]:= Sum[QBinomial[n-j-1,j,q^2]*q^Binomial[n-2*j,2], {j,0,Floor[(n-1)/2] }]; Table[F[n, 2], {n, 0, 20}] (* G. C. Greubel, Dec 17 2019 *)
-
PARI
q=2; m=20; v=concat([0,1], vector(m-2)); for(n=3, m, v[n]=q^(n-2)*v[n-1]+v[n-2]); v \\ G. C. Greubel, Dec 17 2019
-
Sage
def F(n,q): return sum( q_binomial(n-j-1, j, q^2)*q^binomial(n-2*j,2) for j in (0..floor((n-1)/2))) [F(n,2) for n in (0..20)] # G. C. Greubel, Dec 17 2019
Formula
a(n) = 2^(n-1)*a(n-1) + a(n-2).
Comments