OFFSET
0,2
COMMENTS
If p is a prime of the form 8*r +/- 3 then a(p) == 1 (mod p); if p is a prime of the form 8*r +/- 1 then a(p) == 5 (mod p).
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..100
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
G.f.: -(1-12*x-x^2)/((1-x)*(1-6*x+x^2)). - Bruno Berselli, May 15 2012
a(n) = 2*A038723(n) - 3. -Bruno Berselli, May 16 2012
a(n) = -3 + (1/4)*( (4+sqrt(2))*(3+2*sqrt(2))^n + (4-sqrt(2))*(3-2*sqrt(2))^n ). - Colin Barker, Mar 05 2016
From G. C. Greubel, May 24 2021: (Start)
MATHEMATICA
m = 19; n = 1; c = 0;
list3 = Reap[While[c < 22, t = 6 n - m + 12; Sow[t]; m = n; n = t; c++]][[2, 1]]
Table[LucasL[2*n, 2] +Fibonacci[2*n, 2] -3, {n, 0, 40}] (* G. C. Greubel, May 24 2021 *)
PROG
(Magma) I:=[-1, 5]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2)+12: n in [1..19]]; // Bruno Berselli, May 15 2012
(Sage) [lucas_number1(2*n+2, 2, -1) - 2*lucas_number1(2*n, 2, -1) -3 for n in (0..40)] # G. C. Greubel, May 24 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Kenneth J Ramsey, Apr 17 2012
STATUS
approved