OFFSET
1,1
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) = (-97 + 41*(-1)^n + 194*n)/4.
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3; a(1)=14, a(2)=83, a(3)=111.
a(n) = a(n-1) + 69 for n even, a(n) = a(n-1) + 28 for n odd, a(1)=14.
G.f.: x*(14+69*x+14*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Aug 24 2011
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(14*Pi/97)*Pi/97. - Amiram Eldar, Feb 28 2023
MATHEMATICA
Table[(97-41*(-1)^(n-1)+194*(n-1))/4, {n, 1, 50}] (* Vincenzo Librandi, Jul 13 2012 *)
Select[Range[2500], PowerMod[#, 2, 97]==2&] (* or *) LinearRecurrence[{1, 1, -1}, {14, 83, 111}, 50] (* Harvey P. Dale, Mar 28 2024 *)
PROG
(Magma) [(-97+41*(-1)^n+194*n)/4: n in [1..50]]; // Vincenzo Librandi, Jul 13 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Apr 06 2010
STATUS
approved