OFFSET
1,3
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.
LINKS
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)
EXAMPLE
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).
MAPLE
seq(floor(n^4/4-n^2+1), n=1..40);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dennis P. Walsh, Mar 27 2013
STATUS
approved