OFFSET
0,2
COMMENTS
Number of nonnegative integer solutions (x, y) to the equation (2*x + y)*(1 + y)/2 = n. - Gionata Neri, Nov 15 2015
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
From Vladeta Jovovic, Aug 10 2004: (Start)
G.f.: Sum_{k >= 1} x^(k*(k-1)/2)/(1-x^k).
a(2^k) = 1 for k > 0. - Daniel Castle, Feb 09 2021
EXAMPLE
a(0) = 1 because 0 = 0;
a(1) = 2 because 1 = 0+1 or 1;
a(15) = 5 because 15 = 0+1+2+3+4+5 or 1+2+3+4+5 or 4+5+6 or 7+8 or 15.
MAPLE
N:= 1000:
G:= add(x^(k*(k-1)/2)/(1-x^k), k=1..floor((1+sqrt(1+8*N))/2)):
S:= series(G, x, N+1):
seq(coeff(S, x, j), j=0..N); # Robert Israel, Nov 15 2015
PROG
(PARI) vector(100, n, local(A); if( n<0, 0, A = x*O(x^n); polcoeff( eta(x^2+A)^2/eta(x+A), n)) + numdiv(n>>valuation(n, 2))) \\ Altug Alkan, Nov 15 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Apr 13 2000
EXTENSIONS
a(0) = 1 added by N. J. A. Sloane, Dec 02 2020
STATUS
approved