OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..1593
Index entries for linear recurrences with constant coefficients, signature (5,-3,-1).
FORMULA
a(n) = L(0) + L(3) + L(6) + L(9) + ... + L(3n), L(n) = Lucas numbers A000032.
a(n) = Sum_{i=0..n} L(3i).
a(n) = (L(3*n+2)-1)/2+1.
G.f.: -2*(2*x-1)/((x-1)*(x^2+4*x-1)). - Alois P. Heinz, Mar 04 2019
EXAMPLE
L(0) + L(3) = 6;
L(0) + L(3) + L(6) = 24;
L(0) + L(3) + L(6) + L(9) = 100.
MAPLE
f:= gfun:-rectoproc({a(n + 3) - 5*a(n + 2) + 3*a(n + 1) + a(n), a(0) = 2, a(1) = 6, a(2) = 24}, a(n), remember):
map(f, [$0..60]); # Robert Israel, Mar 05 2019
MATHEMATICA
Table[(Lucas[3n+2]-1)/2+1, {n, 0, 25}]
Accumulate[Select[LucasL[Range[0, 100]], EvenQ]] (* or *) LinearRecurrence[ {5, -3, -1}, {2, 6, 24}, 30] (* Harvey P. Dale, Jan 18 2021 *)
PROG
(PARI) L(n) = fibonacci(n+1)+fibonacci(n-1);
a(n) = sum(k=0, n, L(3*k)); \\ Michel Marcus, Mar 05 2019
(Perl) use ntheory ":all"; sub a { vecsum(map{lucasv(1, -1, 3*$_)}0..$_[0]) } # Dana Jacobsen, Mar 05 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Rigoberto Florez, Mar 04 2019
STATUS
approved