OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..3} 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, 3):
seq(a(n), n=0..81); # Alois P. Heinz, Jan 03 2023
MATHEMATICA
g[n_] := With[{t = 5 n^2}, IntegerQ @ Sqrt[t+4] || IntegerQ @ Sqrt[t-4]];
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, 3];
Table[a[n], {n, 0, 81}] (* Jean-François Alcover, May 28 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 03 2023
STATUS
approved