OFFSET
1,1
COMMENTS
Numbers k such that k mod 81 is 22 or 59. - Charles R Greathouse IV, Dec 23 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
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(37*Pi/162)*Pi/81. - Amiram Eldar, Feb 26 2023
MATHEMATICA
Select[Range[2000], PowerMod[#, 2, 81]==79&] (* Harvey P. Dale, Jun 30 2011 *)
LinearRecurrence[{1, 1, -1}, {22, 59, 103}, 50] (* Vincenzo Librandi, Feb 09 2012 *)
PROG
(PARI) a(n)=n\2*81-22*(-1)^n \\ Charles R Greathouse IV, Dec 23 2011
(Magma) I:=[22, 59, 103]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]]; // Vincenzo Librandi, Feb 09 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 16 2009
STATUS
approved