OFFSET
0,1
REFERENCES
Laurențiu Panaitopol, Alexandru Gica, Arithmetic problems and number theory, Ed. Gil, Zalău, (2006), ch. 14, p. 85, pr. 32. (in Romanian).
LINKS
Robert Israel, Table of n, a(n) for n = 0..2000
EXAMPLE
For n=0, 72*0+42 = 42 = 25+9+1+1+1+1+1+1+1+1 = 9+9+9+9+1+1+1+1+1+1, so a(0)=2.
For n=1, 72*1+42 = 114 = 81+25+1+1+1+1+1+1+1+1 = 81+9+9+9+1+1+1+1+1+1 = 49+49+9+1+1+1+1+1+1+1 = 49+25+25+9+1+1+1+1+1+1 = 49+25+9+9+9+9+1+1+1+1 = 49+9+9+9+9+9+9+9+1+1 = 25+25+25+25+9+1+1+1+1+1 = 25+25+25+9+9+9+9+1+1+1 = 25+25+9+9+9+9+9+9+9+1, so a(1)=9.
MAPLE
S:= proc(n, k, m)
option remember;
local p, j;
if k = 0 then if n = 0 then return 1 else return 0 fi
elif m < 1 then return 0
elif n < k then return 0
elif n > k*m^2 then return 0
fi;
if m^2 > n then
p:= floor(sqrt(n));
if p::even then p:= p-1 fi;
return procname(n, k, p)
fi;
add(procname(n-j*m^2, k-j, m-2), j=0..n/m^2)
end proc:
seq(S(72*n+42, 10, 72*n+42), n=0..100); # Robert Israel, Feb 24 2019
MATHEMATICA
a[n_] := IntegerPartitions[72n+42, {10}, Select[ Range[1, 72n+42, 2], IntegerQ@Sqrt@#&]] // Length;
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 19 2022 *)
PROG
(Magma) [#RestrictedPartitions(72*n+42, 10, {(2*d+1)^2:d in [0..100]}): n in [0..100]];
CROSSREFS
KEYWORD
nonn
AUTHOR
Marius A. Burtea, Feb 12 2019
STATUS
approved