|
|
A290990
|
|
p-INVERT of the nonnegative integers (A000027), where p(S) = 1 - S - S^2.
|
|
6
|
|
|
0, 1, 2, 5, 12, 28, 64, 145, 328, 743, 1686, 3830, 8704, 19781, 44950, 102133, 232048, 527208, 1197808, 2721421, 6183108, 14048151, 31917714, 72517738, 164761792, 374342057, 850512458, 1932380869, 4390407092, 9975090996, 22663602720, 51492150953
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A290890 for a guide to related sequences.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) + a(n-4).
G.f.: x*(1 - 2*x + 2*x^2) / (1 - 4*x + 5*x^2 - 2*x^3 - x^4). - Colin Barker, Aug 24 2017
|
|
MATHEMATICA
|
z = 60; s = x^2/(1-x)^2; p = 1 -s -s^2;
Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A000027 *)
Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A290990 *)
LinearRecurrence[{4, -5, 2, 1}, {0, 1, 2, 5}, 50] (* G. C. Greubel, Apr 12 2023 *)
|
|
PROG
|
(PARI) concat(0, Vec(x*(1-2*x+2*x^2)/(1-4*x+5*x^2-2*x^3-x^4) + O(x^50))) \\ Colin Barker, Aug 24 2017
(Magma) I:=[0, 1, 2, 5]; [n le 4 select I[n] else 4*Self(n-1) -5*Self(n-2) +2*Self(n-3) +Self(n-4): n in [1..50]]; // G. C. Greubel, Apr 12 2023
(SageMath)
@CachedFunction
if (n<4): return (0, 1, 2, 5)[n]
else: return 4*a(n-1) -5*a(n-2) +2*a(n-3) +a(n-4)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|