OFFSET
1,1
COMMENTS
Numbers congruent to {7, 40} mod 47. - Amiram Eldar, Feb 26 2023
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-1)+a(n-2)-a(n-3) for n>3.
a(n) = (47+19*(-1)^n+94*(n-1))/4.
G.f.: x*(7+33*x+7*x^2)/((1+x)*(x-1)^2). - R. J. Mathar, Aug 26 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(7*Pi/47)*Pi/47. - Amiram Eldar, Feb 26 2023
MAPLE
MATHEMATICA
Select[Range[1200], Mod[#^2, 47] == 2 &] (* Vincenzo Librandi, Apr 06 2013 *)
Select[Range[2000], PowerMod[#, 2, 47]==2&] (* or *) LinearRecurrence[ {1, 1, -1}, {7, 40, 54}, 60] (* Harvey P. Dale, Sep 29 2013 *)
PROG
(Magma) [(47+19*(-1)^n+94*(n-1))/4: n in [1..60]]; // Vincenzo Librandi, Apr 06 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Aug 11 2009
EXTENSIONS
Edited by R. J. Mathar, Aug 26 2009
STATUS
approved