OFFSET
1,1
COMMENTS
Numbers k such that k == 6 or 31 (mod 37). - Charles R Greathouse IV, Dec 27 2011
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
From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 6*(-1)^(n+1) + 37*floor(n/2).
a(n) = a(n-2) + 37 for all n > 2. (End)
G.f.: x*(6 + 25*x + 6*x^2)/((1 + x)*(1 - x)^2). - Vincenzo Librandi, May 03 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(6*Pi/37)*Pi/37. - Amiram Eldar, Feb 26 2023
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {6, 31, 43}, 100] (* Vincenzo Librandi, Feb 29 2012 *)
Select[Range[1000], PowerMod[#, 2, 37]==36&] (* Harvey P. Dale, May 06 2012 *)
CoefficientList[Series[(6 + 25 x + 6 x^2)/((1 + x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
PROG
(PARI) A155097(n)=n\2*37-6*(-1)^n /* M. F. Hasler, Jun 16 2010 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 20 2009
EXTENSIONS
Terms checked, a(28) corrected, and minor edits by M. F. Hasler, Jun 16 2010
STATUS
approved