OFFSET
1,1
COMMENTS
Positive numbers k such that k^2 == 2 (mod 113), where the prime 113 == 1 (mod 8).
Equivalently, numbers k such that k == 51 or 62 (mod 113).
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
a(n) = a(n-2) + 113.
G.f.: x*(51+11*x+51*x^2)/((1+x)*(x-1)^2).
a(n) = (-113-91*(-1)^n+226*n)/4.
a(n) = a(n-1)+a(n-2)-a(n-3).
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(11*Pi/226)*Pi/113. - Amiram Eldar, Feb 28 2023
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {51, 62, 164}, 40] (* or *) CoefficientList[Series[x*(51+11*x+51*x^2)/((1+x)*(x-1)^2), {x, 0, 40}], x] (* or *) a[1] = 51; a[n_] := a[n] = 113*(n-1) - a[n-1]; Table[a[n], {n, 1, 40}]
PROG
(Magma) [(-113-91*(-1)^n+226*n)/4: n in [1..60]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 09 2012
STATUS
approved