OFFSET
1,2
COMMENTS
Numbers congruent to {1, 18} mod 19. - Amiram Eldar, Feb 27 2023
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(1)=1, a(2)=18 then add alternatively 2 and 17.
a(n) = 19*(n-1) - a(n-1), (with a(1)=1). - Vincenzo Librandi, Nov 13 2010
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(Pi/19)*Pi/19. - Amiram Eldar, Feb 27 2023
MATHEMATICA
s={}; Do[If[IntegerQ[(18n^2+1)/19], AppendTo[s, n]], {n, 200}]; s
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -1, 1, 1]^(n-1)*[1; 18; 20])[1, 1] \\ Charles R Greathouse IV, Jul 08 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Jan 13 2006
EXTENSIONS
a(22)-a(56) from Vincenzo Librandi, Oct 23 2009
STATUS
approved
