OFFSET
0,2
REFERENCES
Hugh C. Williams, Edouard Lucas and Primality Testing, John Wiley and Sons, 1998, p. 75.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8,-8,1).
FORMULA
a(n) = 8*a(n-1) - 8*a(n-2) + a(n-3).
G.f.: 5*x*(2-x)/((1-x)*(1-7*x+x^2)). - Colin Barker, Apr 16 2012
MAPLE
with(combinat): option remember: if n=0 then RETURN(2) fi: if n=1 then RETURN(1) fi: luc(n-1)+luc(n-2): end: for n from 0 to 25 do printf(`%d, `, luc(4*n+1)-1) od: # James A. Sellers, Mar 03 2003
MATHEMATICA
LucasL[4*Range[0, 20]+1]-1 (* or *) LinearRecurrence[{8, -8, 1}, {0, 10, 75}, 20] (* Harvey P. Dale, Mar 02 2015 *)
PROG
(PARI) vector(20, n, n--; f=fibonacci; f(4*n+2)+f(4*n)-1) \\ G. C. Greubel, Jul 14 2019
(Magma) [Lucas(4*n+1) -1: n in [0..20]]; // G. C. Greubel, Jul 14 2019
(Sage) [lucas_number2(4*n+1, 1, -1) - 1 for n in (0..20)] # G. C. Greubel, Jul 14 2019
(GAP) List([0..20], n-> Lucas(1, -1, 4*n+1)[2] -1 ); # G. C. Greubel, Jul 14 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. K. Guy, Mar 01 2003
EXTENSIONS
More terms from James A. Sellers, Mar 03 2003
STATUS
approved