OFFSET
1,4
COMMENTS
Number of integers k, 0 <= k <= n/2 such that n - 2k is a square.
FORMULA
See Maple line.
EXAMPLE
a(11) = 2: the partitions are (1,10) and (5,6).
MAPLE
f := n->if n mod 2 = 0 then floor(sqrt((n-2)/4))+1 else floor(sqrt((n-2)/4)-1/2)+1; fi; # then add 1 if n is a square!
PROG
(PARI)
a(n)={my(ct=0, d=0); while(d^2<=n, if((n-d^2)%2==0, ct+=1); d+=1 ); return(ct); }
/* Joerg Arndt, Oct 08 2012 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Anne M. Donovan (anned3005(AT)aol.com), May 31 2003
EXTENSIONS
More terms from Michel ten Voorde, Jun 13 2003
STATUS
approved
