login
p-INVERT of the nonnegative integers (A000027), where p(S) = 1 - S - S^2.
6

%I #18 Apr 13 2023 02:34:24

%S 0,1,2,5,12,28,64,145,328,743,1686,3830,8704,19781,44950,102133,

%T 232048,527208,1197808,2721421,6183108,14048151,31917714,72517738,

%U 164761792,374342057,850512458,1932380869,4390407092,9975090996,22663602720,51492150953

%N p-INVERT of the nonnegative integers (A000027), where p(S) = 1 - S - S^2.

%C 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).

%C See A290890 for a guide to related sequences.

%H Clark Kimberling, <a href="/A290990/b290990.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2,1).

%F a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3) + a(n-4).

%F 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

%t z = 60; s = x^2/(1-x)^2; p = 1 -s -s^2;

%t Drop[CoefficientList[Series[s, {x,0,z}], x], 1] (* A000027 *)

%t Drop[CoefficientList[Series[1/p, {x,0,z}], x], 1] (* A290990 *)

%t LinearRecurrence[{4,-5,2,1}, {0,1,2,5}, 50] (* _G. C. Greubel_, Apr 12 2023 *)

%o (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

%o (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

%o (SageMath)

%o @CachedFunction

%o def a(n): # a = A290990

%o if (n<4): return (0,1,2,5)[n]

%o else: return 4*a(n-1) -5*a(n-2) +2*a(n-3) +a(n-4)

%o [a(n) for n in range(51)] # _G. C. Greubel_, Apr 12 2023

%Y Cf. A000027, A033453, A289780, A290890, A290991.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, Aug 21 2017