OFFSET
1,1
COMMENTS
Positive numbers k such that k^2 == 2 (mod 167), where the prime 167 == -1 (mod 8).
Equivalently, numbers k such that k == 13 or 154 (mod 167).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
G.f.: x*(13+141*x+13*x^2)/((1+x)*(x-1)^2).
a(n) = (-167+115*(-1)^n+334*n)/4.
a(n) = a(n-1)+a(n-2)-a(n-3).
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(13*Pi/167)*Pi/167. - Amiram Eldar, Feb 28 2023
MATHEMATICA
CoefficientList[Series[x*(13+141*x+13*x^2)/((1+x)*(x-1)^2), {x, 0, 40}], x] (* or *) LinearRecurrence[{1, 1, -1}, {13, 154, 180}, 40]
PROG
(Magma) [(-167+115*(-1)^n+334*n)/4: n in [1..60]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 09 2012
STATUS
approved