OFFSET
1,3
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A001156(prime(n)).
EXAMPLE
prime(5) = 11 = 11*1^2 = 3^2+2*1^2 = 2*2^2+3*1^2 = 2^2+7*1^2, so a(5) = 4.
MATHEMATICA
f[n_, i_] := f[n, i] = If[n == 0, 1, If[i < 1, 0, f[n, i - 1] + If[i^2 > n, 0, f[n - i^2, i] ] ] ]; Table[f[#, Floor@ Sqrt[#]] &[Prime[n]], {n, 120}] (* Michael De Vlieger, Dec 26 2024, after Jean-François Alcover at A001156 *)
CROSSREFS
KEYWORD
nonn,new
AUTHOR
David James Sycamore, Dec 25 2024
EXTENSIONS
More terms from Michael De Vlieger, Dec 26 2024.
STATUS
approved