cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

0, 1, 12, 49, 132, 289, 552, 961, 1560, 2401, 3540, 5041, 6972, 9409, 12432, 16129, 20592, 25921, 32220, 39601, 48180, 58081, 69432, 82369, 97032, 113569, 132132, 152881, 175980, 201601, 229920, 261121, 295392, 332929, 373932, 418609, 467172, 519841, 576840, 638401
Offset: 1

Views

Author

Dennis P. Walsh, Mar 27 2013

Keywords

Comments

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.

Examples

			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).
		

Programs

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

Formula

a(n) = floor(n^4/4-n^2+1).
Conjectures from Colin Barker, Apr 01 2013: (Start)
a(n) = (7 + (-1)^n - 8*n^2 + 2*n^4)/8.
G.f.: -x^2*(x^4 - 4*x^3 + 6*x^2 + 8*x + 1) / ((x-1)^5*(x+1)). (End)