OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
FORMULA
a(n) = Sum_{k=0..4} A319394(n,k). - Alois P. Heinz, Jan 03 2023
MAPLE
h:= proc(n) option remember; `if`(n<1, 0, `if`((t->
issqr(t+4) or issqr(t-4))(5*n^2), n, h(n-1)))
end:
b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
b(n, h(i-1))+expand(x*b(n-i, h(min(n-i, i)))))
end:
a:= n-> (p-> add(coeff(p, x, i), i=0..4))(b(n, h(n))):
seq(a(n), n=0..87); # Alois P. Heinz, Jan 03 2023
MATHEMATICA
h[n_] := h[n] = If[n < 1, 0, With[{t = 5 n^2}, If[IntegerQ @ Sqrt[t + 4] || IntegerQ @ Sqrt[t - 4], n, h[n - 1]]]];
b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x^n, b[n, h[i - 1]] + Expand[x*b[n - i, h[Min[n - i, i]]]]];
a[n_] := Sum[Coefficient[#, x, i], {i, 0, 4}]&[b[n, h[n]]];
Table[a[n], {n, 0, 87}] (* Jean-François Alcover, May 26 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 03 2023
STATUS
approved