|
|
A193530
|
|
Expansion of (1 - 2*x - 2*x^2 + 3*x^3 + x^5)/((1-x)*(1-2*x-x^2)*(1-2*x^2-x^4)).
|
|
1
|
|
|
1, 1, 2, 3, 7, 13, 31, 66, 159, 363, 876, 2065, 4985, 11915, 28765, 69156, 166957, 402373, 971414, 2343519, 5657755, 13654969, 32966011, 79577190, 192116331, 463786191, 1119678912, 2703086893, 6525829037, 15754607063, 38034986041, 91824246216, 221683340569, 535190123593, 1292063254826
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
This sequence was initially confused with A003120, but they are different sequences. The g.f. used here as the definition was found by Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (2 + Q(n) + 2*(1+(-1)^n)*Pell((n+2)/2) + 2*(1-(-1)^n)*Pell((n+1)/2))/8.
a(2*n) = (2 + Q(2*n) + 4*Pell(n+1))/8.
a(2*n+1) = (2 + Q(2*n+1) + 4*Pell(n+1))/8, where Pell(n) = A000129(n), and Q(n) = A002203. (End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
LinearRecurrence[{3, 1, -7, 3, -1, 1, 1}, {1, 1, 2, 3, 7, 13, 31}, 40] (* Vincenzo Librandi, Aug 28 2016 *)
Table[(2 +LucasL[n, 2] +2*(1+(-1)^n)*Fibonacci[(n+2)/2, 2] + 2*(1-(-1)^n)*Fibonacci[(n+1)/2, 2])/8, {n, 0, 40}] (* G. C. Greubel, May 21 2021 *)
|
|
PROG
|
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1-2*x-2*x^2 +3*x^3+x^5)/((1-x)*(1-2*x-x^2)*(1-2*x^2-x^4)) )); // Vincenzo Librandi, Aug 28 2016
(Sage)
@CachedFunction
def Pell(n): return n if (n<2) else 2*Pell(n-1) + Pell(n-2)
def A193530(n): return (1 + Pell(n+1) - Pell(n) + (1 + (-1)^n)*Pell((n+2)/2) + (1-(-1)^n)*Pell((n+1)/2) )/4
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|