login
Number of sets of exactly nine positive integers <= n having a square element sum.
2

%I #11 Feb 02 2017 19:11:50

%S 0,1,3,14,47,121,296,660,1358,2646,4905,8704,14887,24649,39651,62175,

%T 95286,143038,210732,305210,435195,611697,848494,1162662,1575195,

%U 2111713,2803273,3687272,4808464,6220104,7985229,10178073,12885638,16209468,20267579,25196567

%N Number of sets of exactly nine positive integers <= n having a square element sum.

%H Alois P. Heinz, <a href="/A281869/b281869.txt">Table of n, a(n) for n = 9..1000</a>

%e a(10) = 1: {1,2,3,4,5,7,8,9,10}.

%e a(11) = 3: {1,2,3,4,5,6,7,10,11}, {1,2,3,4,5,6,8,9,11}, {1,2,3,4,5,7,8,9,10}.

%p b:= proc(n, i, t) option remember;

%p `if`(i<t, 0, `if`(n=0, `if`(t=0, 1, 0),

%p `if`(t<1 or n<t*(t+1)/2 or n>(t+1)*(2*i-t)/2, 0,

%p `if`(i>n, 0, b(n-i, i-1, t-1))+b(n, i-1, t))))

%p end:

%p a:= proc(n) option remember; `if`(n<0, 0, a(n-1)+add(

%p b(j^2-n, n-1, 8), j=isqrt(n-36)..isqrt(9*n-36)))

%p end:

%p seq(a(n), n=9..60);

%Y Column k=9 of A281871.

%K nonn

%O 9,3

%A _Alois P. Heinz_, Feb 01 2017