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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 03 2023
STATUS
approved