cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A136487 Coefficients of polynomial recursion p(n,x) = (x-1)*(p(n-1,x) - (x+1)*p(n-2,x)), p(0,x) = 1, p(1,x) = x+1.

This page as a plain text file.
%I A136487 #21 Dec 28 2023 11:33:53
%S A136487 1,1,1,1,1,-1,-1,-1,0,2,0,-1,2,0,-4,0,2,-3,2,7,-4,-5,2,1,5,-5,-11,11,
%T A136487 7,-7,-1,1,-8,12,16,-28,-8,20,0,-4,13,-25,-20,60,-2,-46,12,12,-3,-1,
%U A136487 -21,50,19,-120,38,92,-50,-24,15,2,-1
%N A136487 Coefficients of polynomial recursion p(n,x) = (x-1)*(p(n-1,x) - (x+1)*p(n-2,x)), p(0,x) = 1, p(1,x) = x+1.
%C A136487 Only coefficients of x^k for k <= degree of p(n,x) are included. With this then, since p(2,x) = 0, row 2 is empty.
%C A136487 The same polynomial coefficients may be obtained, without signs, with the use of the recurrence p(x, n) = (x+1)*p(x, n-1) - (x^2-1)*p(x, n-2), and p(x, 0) = 1, p(x, 1) = x-1.
%H A136487 Robert Israel, <a href="/A136487/b136487.txt">Table of n, a(n) for n = 0..10103</a>(rows 0 to 141, flattened)
%F A136487 T(n, k) = coefficient [x^k] ( p(x, n) ), where p(x,n) = (x-1)*p(x,n-1) - (x^2-1)*p(x,n-2), p(x,0) = 1, p(x,1) = x+1.
%F A136487 Sum_{k >= 0} T(n, k) = A130706(n).
%F A136487 From _Robert Israel_, Dec 03 2018: (Start)
%F A136487 T(n,k) = T(n-1,k-1) - T(n-1,k) - T(n-2,k-2) + T(n-2,k).
%F A136487 G.f. as array: (1-2*x)/(1 + x*(y-1)+x^2*(1-y^2)).
%F A136487 T(n,0) = (-1)^(n+1)*A000045(n-2) for n >= 3. (End)
%e A136487 First few rows are:
%e A136487     1;
%e A136487     1,   1;
%e A136487    {};
%e A136487     1,   1,  -1,   -1;
%e A136487    -1,   0,   2,    0, -1;
%e A136487     2,   0,  -4,    0,  2;
%e A136487    -3,   2,   7,   -4, -5,   2,   1;
%e A136487     5,  -5, -11,   11,  7,  -7,  -1,   1;
%e A136487    -8,  12,  16,  -28, -8,  20,   0,  -4;
%e A136487    13, -25, -20,   60, -2, -46,  12,  12, -3, -1;
%e A136487   -21,  50,  19, -120, 38,  92, -50, -24, 15,  2, -1;
%p A136487 F:= proc(n) option remember; expand((1-x)*procname(n-1)+(1-x^2)*procname(n-2)) end proc:
%p A136487 F(0):= 1: F(1):= 1+x:
%p A136487 R:=proc(n) local V,j;
%p A136487  V:= F(n);
%p A136487  seq(coeff(V,x,j),j=0..degree(V))
%p A136487 end proc:
%p A136487 for i from 0 to 20 do R(i) od; # _Robert Israel_, Dec 03 2018
%t A136487 P[x,0]= 1; P[x,1]= x+1; P[x_,n_]:= P[x,n]= (x-1)*(P[x,n-1] - (x+1)*P[x,n-2]);
%t A136487 Table[CoefficientList[P[x,n],x],{n,0,10}]//Flatten
%o A136487 (Magma)
%o A136487 m:=12;
%o A136487 function p(n,x)
%o A136487   if n le 1 then return (x+1)^n;
%o A136487   else return (x-1)*(p(n-1,x) - (x+1)*p(n-2,x));  end if;
%o A136487 end function;
%o A136487 R<x>:=PowerSeriesRing(Integers(), m+2);
%o A136487 T:= func< n,k | Coefficient(R!( p(n,x) ), k) >;
%o A136487 [1,1,1] cat [T(n,k): k in [0..n], n in [3..m]]; // _G. C. Greubel_, Jul 31 2023
%o A136487 (SageMath)
%o A136487 def p(n,x):
%o A136487     if n<2: return (x+1)^n
%o A136487     else: return (x-1)*(p(n-1,x) - (x+1)*p(n-2,x))
%o A136487 def T(n):
%o A136487     P.<x> = PowerSeriesRing(QQ)
%o A136487     return P( p(n,x) ).list()
%o A136487 flatten([T(n) for n in range(13)]) # _G. C. Greubel_, Jul 31 2023
%Y A136487 Cf. A000045, A130706 (row sums).
%K A136487 tabf,sign
%O A136487 0,10
%A A136487 _Roger L. Bagula_, Mar 21 2008
%E A136487 Edited by _Robert Israel_, Dec 03 2018