OFFSET
0,4
COMMENTS
The difference equation y(n, x, s, q) = x*y(n-1, x, s, q) + q^(n-3)*y(n-2, x, s, q) yields the two-variable q-Fibonacci polynomials in the form y(n, x, s, q) = Sum_{j=0..floor((n-1)/2)} q-binomial(n-j-1,j, q)*q^(j*(j-1))*x^(n-2*j-1)*s^j. When x=s=1 these polynomials reduce to q-Fibonacci numbers. This family of q-Fibonacci numbers is different from that of the q-Fibonacci numbers defined in A015459 and A015473. - G. C. Greubel, Dec 17 2019
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..100
MAPLE
q:=2; 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
F[n_, q_]:= Sum[QBinomial[n-j-1, j, q]*q^(j*(j-1)), {j, 0, Floor[(n-1)/2]}];
Table[F[n, 2], {n, 0, 20}] (* G. C. Greubel, Dec 19 2019 *)
nxt[{n_, a_, b_}]:={n+1, b, b+a*2^(n-2)}; NestList[nxt, {1, 0, 1}, 20][[All, 2]] (* Harvey P. Dale, Oct 03 2021 *)
PROG
(PARI) a(n) = if(n<2, n, a(n-1) + 2^(n-3)*a(n-2));
(Magma) q:=2; 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, 2) for n in (0..20)] # G. C. Greubel, Dec 19 2019
(GAP) q:=2;; 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
KEYWORD
nonn
AUTHOR
Jaume Oliver Lafont, Sep 29 2009
STATUS
approved