OFFSET
0,5
FORMULA
MAPLE
b:= proc(n) option remember; `if`(n=0, 1, add(
`if`(issqr(8*j+1), b(n-j), 0), j=1..n))
end:
a:= n-> b(n)-`if`(issqr(8*n+1), 1, 0):
seq(a(n), n=0..43); # Alois P. Heinz, Oct 21 2021
MATHEMATICA
b[n_] := b[n] = If[n == 0, 1, Sum[
If[IntegerQ@ Sqrt[8*j + 1], b[n - j], 0], {j, 1, n}]];
a[n_] := b[n] - If[IntegerQ@ Sqrt[8*n + 1], 1, 0];
Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Oct 21 2021
STATUS
approved