OFFSET
1,1
COMMENTS
Positive numbers k such that k^2 == 2 (mod 137), where the prime 137 == 1 (mod 8).
Equivalently, numbers k such that k == 31 or 106 (mod 137).
The subsequence of primes begins: 31, 853, 1613, 1949, 2161. - Jonathan Vos Post, Mar 09 2012
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) + 137.
G.f.: x*(31+75*x+31*x^2)/((1+x)*(x-1)^2).
a(n) = (-137+13*(-1)^n+274*n)/4.
a(n) = a(n-1)+a(n-2)-a(n-3).
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(31*Pi/137)*Pi/137. - Amiram Eldar, Feb 28 2023
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {31, 106, 168}, 40] (* or *) CoefficientList[Series[x*(31+75*x+31*x^2)/((1+x)*(x-1)^2), {x, 0, 50}], x] (* or *) a[1] = 31; a[n_] := a[n] = 137*(n-1) - a[n-1]; Table[a[n], {n, 1, 40}]
PROG
(Magma) [(-137+13*(-1)^n+274*n)/4: n in [1..60]];
(Magma) [n: n in [1..3000] | n^2 mod 137 eq 2]; // Vincenzo Librandi, Mar 31 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 09 2012
STATUS
approved