login
Number of positive integer solutions to the Diophantine equation x + y + 2z = n^2.
0

%I #35 Feb 16 2024 06:30:30

%S 0,1,12,49,132,289,552,961,1560,2401,3540,5041,6972,9409,12432,16129,

%T 20592,25921,32220,39601,48180,58081,69432,82369,97032,113569,132132,

%U 152881,175980,201601,229920,261121,295392,332929,373932,418609,467172,519841,576840,638401

%N Number of positive integer solutions to the Diophantine equation x + y + 2z = n^2.

%C The derivation for the number of integer solutions is given in a link below. It is straightforward and uses the fact that the number of positive integer solutions to x + y = n is given by n-1.

%H Dennis Walsh, <a href="http://capone.mtsu.edu/dwalsh/DIOQUAD3.pdf">The number of positive integer solutions to the Diophantine equation x+y+2z=n^2</a>

%F a(n) = floor(n^4/4-n^2+1).

%F Conjectures from _Colin Barker_, Apr 01 2013: (Start)

%F a(n) = (7 + (-1)^n - 8*n^2 + 2*n^4)/8.

%F G.f.: -x^2*(x^4 - 4*x^3 + 6*x^2 + 8*x + 1) / ((x-1)^5*(x+1)). (End)

%e For n=3, a(n)=12 since there are exactly 12 positive integer solutions (x,y,z) to x+y+2z=9, namely, (1,2,3),(1,4,2), (1,6,1), (2,1,3), (2,3,2), (2,5,1), (3,2,2),(3,4,1), (4,1,2), (4,3,1), (5,2,1), and (6,1,1).

%p seq(floor(n^4/4-n^2+1),n=1..40);

%K nonn,easy

%O 1,3

%A _Dennis P. Walsh_, Mar 27 2013