A147586 a(n) = A142710(n)/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
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,7,-12,-11,16,-4).
Programs
-
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
-
Mathematica
LinearRecurrence[{2,7,-12,-11,16,-4}, {1,1,3,7,19,56,138}, 51] (* 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
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)
Extensions
Terms a(11) onward added by G. C. Greubel, Oct 26 2022