OFFSET
1,2
COMMENTS
Equivalently, numbers in increasing order of the form m*(21*m + 2) or m*(21*m + 16) + 3, where m = 0, -1, 1, -2, 2, -3, 3, ....
Let F(r) = Product_{n >= 1} 1 - q^(28*n-r). The sequence terms are the exponents in the expansion of F(0)*F(3)*F(8)*F(11)*F(14)*F(17)*F(20)*F(25) = 1 - q^3 - q^8 + q^19 + q^23 - q^40 - q^55 + + - - ... (by the quintuple product identity). Cf. A204221. - Peter Bala, Dec 25 2024
LINKS
Bruno Berselli, 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.: x^2*(3 + 5*x + 11*x^2 + 4*x^3 + 11*x^4 + 5*x^5 + 3*x^6)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2).
a(n) = a(-n+1) = (42*n*(n-1) + 2*i^(n*(n+1))*(6*n + (-1)^n-3) + 7*(-1)^n*(2*n-1) + 11)/32, where i=sqrt(-1).
Sum_{n>=2} 1/a(n) = 21/4 - cot(2*Pi/21)*Pi/2 + Pi/(2*sqrt(3)) - tan(Pi/14)*Pi/2. - Amiram Eldar, Mar 16 2022
MAPLE
A219391:=proc(q)
local n;
for n from 1 to q do if type(sqrt(21*n+1), integer) then print(n);
fi; od; end:
A219391(1000); # Paolo P. Lava, Feb 19 2013
MATHEMATICA
Select[Range[0, 3300], IntegerQ[Sqrt[21 # + 1]] &]
CoefficientList[Series[x (3 + 5 x + 11 x^2 + 4 x^3 + 11 x^4 + 5 x^5 + 3 x^6)/((1 + x)^2 (1 - x)^3 (1 + x^2)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {0, 3, 8, 19, 23, 40, 55, 80, 88}, 60] (* Harvey P. Dale, Oct 01 2021 *)
PROG
(Magma) [n: n in [0..3300] | IsSquare(21*n+1)];
(Magma) I:=[0, 3, 8, 19, 23, 40, 55, 80, 88]; [n le 9 select I[n] else Self(n-1)+2*Self(n-4)-2*Self(n-5)-Self(n-8)+Self(n-9): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
(Maxima) makelist((42*n*(n-1)+2*%i^(n*(n+1))*(6*n+(-1)^n-3)+7*(-1)^n*(2*n-1)+11)/32, n, 1, 50);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Nov 20 2012
STATUS
approved