OFFSET
1,2
COMMENTS
Let F(r) = Product_{n >= 0} 1 - q^(21*(14*n+r)). The sequence terms occur as the exponents in the expansion of (1 - q^21)*F(5)*F(6)*F(7)*F(8)*F(9)*F(13)*F(14)*F(15) = 1 - q^21 - q^105 + q^210 + q^231 - q^378 - q^630 + + - - ... (by the quintuple product identity). - Peter Bala, Dec 23 2024
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,2,-2,0,0,-1,1).
FORMULA
G.f.: -21*x^2*(x^2-x+1)*(x^4+5*x^3+9*x^2+5*x+1) / ((x-1)^3*(x+1)^2*(x^2+1)^2). - Colin Barker, Sep 23 2013
From Peter Bala, Dec 24 2025: (Start)
a(n) is quasi-polynomial in n:
a(4*n) = 21 * n*(21*n - 1)/2; a(4*n+1) = 21 * n*(21*n + 1)/2;
a(4*n+2) = 21 * (3*n + 1)*(7*n + 2)/2; a(4*n+3) = 21 * (3*n + 2)*(7*n + 5)/2. (End)
MAPLE
a[0] := 0:a[1] := 6:a[2] := 14:a[3] := 20:a[4] := 21:a[5] := 27:a[6] := 35:a[7] := 41:seq((42*(floor(i/8))+a[i mod 8])*(42*(floor(i/8))+a[i mod 8]+1)/2, i=0..100);
# alternative program
A := proc (q) local n: for n from 0 to q do if type((1/21)*n*(n+1)/2, integer) then print(n*(n+1)/2) fi; od; end: A(250); # Peter Bala, Dec 24 2024
MATHEMATICA
Select[21Range[1100], OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Aug 16 2021 *)
Select[Accumulate[Range[0, 300]], IntegerQ[#/21]&] (* Harvey P. Dale, Jun 12 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Mar 30 2002
EXTENSIONS
More terms from Sascha Kurz, Apr 01 2002
a(1)=0 added and edited by Alois P. Heinz, Aug 19 2021
STATUS
approved