login
A359516
Number of compositions (ordered partitions) of n into at most 4 positive Fibonacci numbers (with a single type of 1).
4
1, 1, 2, 4, 7, 13, 20, 27, 35, 40, 46, 50, 55, 60, 61, 60, 65, 68, 72, 76, 73, 72, 66, 66, 79, 73, 85, 80, 79, 90, 76, 84, 85, 60, 72, 56, 69, 85, 69, 99, 89, 70, 97, 73, 94, 97, 66, 90, 72, 70, 96, 60, 85, 60, 24, 72, 44, 71, 88, 57, 105, 85, 78, 111, 74, 97, 82, 48, 97, 69, 79
OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..4} A121548(n,k). - Alois P. Heinz, Jan 03 2023
MAPLE
g:= proc(n) g(n):= (t-> issqr(t+4) or issqr(t-4))(5*n^2) end:
b:= proc(n, t) option remember; `if`(n=0, 1, `if`(t<1, 0,
add(`if`(g(j), b(n-j, t-1), 0), j=1..n)))
end:
a:= n-> b(n, 4):
seq(a(n), n=0..100); # Alois P. Heinz, Jan 03 2023
MATHEMATICA
g[n_] := Function[t, IntegerQ@Sqrt[t + 4] || IntegerQ@Sqrt[t - 4]][5 n^2];
b[n_, t_] := b[n, t] = If[n == 0, 1, If[t < 1, 0, Sum[If[g[j], b[n - j, t - 1], 0], {j, 1, n}]]];
a[n_] := b[n, 4];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 13 2023, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 03 2023
STATUS
approved