OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = A121548(2n,n).
a(n) ~ c * d^n / sqrt(n), where d = 3.532272846853808150678856189005437981671101510837727... and c = 0.2903295565097076269212760734928134309226027... - Vaclav Kotesovec, Feb 14 2021
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, `if`(t=0, 1, 0), `if`(t<1, 0, add(
`if`(g(j), b(n-j, t-1), 0), j=1..n)))
end:
a:= n-> b(2*n, n):
seq(a(n), n=0..35);
MATHEMATICA
g[n_] := g[n] = With[{t = 5*n^2}, IntegerQ@Sqrt[t+4] || IntegerQ@Sqrt[t-4]];
b[n_, t_] := b[n, t] =
If[n == 0, If[t == 0, 1, 0], If[t < 1, 0, Sum[
If[g[j], b[n - j, t - 1], 0], {j, 1, n}]]];
a[n_] := b[2n, n];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 04 2021
STATUS
approved