OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (terms n=1..1000 from R. H. Hardin)
FORMULA
G.f.: Product(1+x^(2*F(j))/(1-x^(F(j))), j=2..infinity), where F = A000045 are the Fibonacci numbers. - Emeric Deutsch, Jun 24 2009
EXAMPLE
a(9) = 5 because we have 333, 33111, 222111, 2211111, and 1^9. - Emeric Deutsch, Jun 24 2009
MAPLE
with(combinat); g := product(1+x^(2*fibonacci(j))/(1-x^fibonacci(j)), j = 2 .. 10): gser := series(g, x = 0, 95): seq(coeff(gser, x, n), n = 0 .. 65); # Emeric Deutsch, Jun 24 2009
# second Maple program:
F:= proc(n) option remember; (<<0|1>, <1|1>>^n)[1, 2] end:
b:= proc(n, i) option remember; `if`(n=0, 1, (f-> `if`(2*f<=n,
add(b(n-j*f, i+1), j=[0, $2..n/f]), 0))(F(i)))
end:
a:= n-> b(n, 2):
seq(a(n), n=0..80); # Alois P. Heinz, Feb 23 2019
MATHEMATICA
F[n_] := F[n] = MatrixPower[{{0, 1}, {1, 1}}, n][[1, 2]];
b[n_, i_] := b[n, i] = If[n == 0, 1, With[{f = F[i]}, If[2*f <= n,
Sum[b[n - j*f, i + 1], {j, Join[{0}, Range[2, n/f]]}], 0]]];
a[n_] := b[n, 2];
Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Apr 26 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Jun 02 2009
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Feb 23 2019
STATUS
approved