login
A147586
a(n) = A142710(n)/2.
2
1, 1, 3, 7, 19, 56, 138, 407, 999, 2851, 7113, 19702, 49954, 135461, 347553, 929567, 2403759, 6374236, 16564458, 43697227, 113896339, 299525051, 782121453, 2053027082, 5366641794, 14071792681, 36807232413, 96449857207, 252375716899, 661078086176, 1730190463338, 4531099045727
OFFSET
0,3
FORMULA
From G. C. Greubel, Oct 26 2022: (Start)
a(n) = (1/2)*( (-1)^n*LucasL(n) + LucasL(2*n) - (1 + (-1)^n)*2^(n-1) - [n=0]).
a(n) = 2*a(n-1) + 7*a(n-2) - 12*a(n-3) - 11*a(n-4) + 16*a(n-5) - 4*a(n-6), n >= 7.
G.f.: (1 - x - 6*x^2 + 6*x^3 + 7*x^4 - 2*x^6)/((1 - 4*x^2)*(1 + x - x^2)*(1 - 3*x + x^2)). (End)
MATHEMATICA
LinearRecurrence[{2, 7, -12, -11, 16, -4}, {1, 1, 3, 7, 19, 56, 138}, 51] (* G. C. Greubel, Oct 26 2022 *)
PROG
(Magma) [n eq 0 select 1 else ((-1)^n*Lucas(n) +Lucas(2*n) -(1+(-1)^n)*2^(n-1))/2: n in [0..50]]; // G. C. Greubel, Oct 26 2022
(SageMath)
def A147586(n): return ((-1)^n*lucas_number2(n, 1, -1) + lucas_number2(2*n, 1, -1) - (1 + (-1)^n)*2^(n-1) -int(n==0))/2
[A147586(n) for n in range(51)] # G. C. Greubel, Oct 26 2022
CROSSREFS
Sequence in context: A100702 A367484 A224031 * A305197 A071716 A306088
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 08 2008
EXTENSIONS
Terms a(11) onward added by G. C. Greubel, Oct 26 2022
STATUS
approved