OFFSET
0,2
COMMENTS
If p is a prime of the form 8*n +- 1 then a(p) == 3 (mod p); if p is a prime of the form 8*n +- 3 then a(p) == -1 (mod p).
From Pedro Caceres, Dec 30 2017:
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
G.f.: (1-4*x-x^2)/((1-x)*(1-6*x+x^2)). - Bruno Berselli, Jun 07 2012
a(n) = 1 + A000129(2*n). - G. C. Greubel, May 24 2021
MATHEMATICA
m = -11; n = -1; c = 0;
list3 = Reap[While[c < 22, t = 6 n - m - 4; Sow[t]; m = n; n = t; c++]][[2, 1]]
CoefficientList[Series[(1-4*x-x^2)/((1-x)*(1-6*x+x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 26 2012 *)
1 + Fibonacci[2*Range[0, 40], 2] (* G. C. Greubel, May 24 2021 *)
PROG
(Magma) I:=[1, 3]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2)-4: n in [1..41]]; // Bruno Berselli, Jun 07 2012
(PARI) my(x='x+O('x^40)); Vec((1-4*x-x^2)/((1-x)*(1-6*x+x^2))) \\ Altug Alkan, Dec 30 2017
(Sage) [1 + lucas_number1(2*n, 2, -1) for n in (0..40)] # G. C. Greubel, May 24 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kenneth J Ramsey, Apr 17 2012
STATUS
approved