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.

A192873 Coefficient of x in the reduction by (x^2->x+1) of the polynomial p(n,x) given in Comments.

Original entry on oeis.org

0, 1, 2, 7, 18, 49, 128, 337, 882, 2311, 6050, 15841, 41472, 108577, 284258, 744199, 1948338, 5100817, 13354112, 34961521, 91530450, 239629831, 627359042, 1642447297, 4299982848, 11257501249, 29472520898, 77160061447, 202007663442, 528862928881, 1384581123200
Offset: 0

Views

Author

Clark Kimberling, Jul 11 2011

Keywords

Comments

The polynomial p(n,x) is defined by p(0,x) = 1, p(1,x) = x, and p(n,x) = x*p(n-1,x) + (x^2)*p(n-1,x) + 1. See A192872.
First differences give A236428. - Richard R. Forberg, Feb 23 2014

Examples

			The coefficients of all the polynomials p(n,x) are Fibonacci numbers (A000045).  The first 6 and their reductions:
p(0,x) = 1 -> 1
p(1,x) = x -> x
p(2,x) = 1 +2*x^2 -> 3 +2*x
p(3,x) = 1 +x +3*x^3 -> 4 +7*x
p(4,x) = 1 +x +2*x^2 +5*x^4 -> 13 +18*x
p(5,x) = 1 +x +2*x^2 +3*x^3 +8*x^5 -> 30 +49*x
G.f. = x + 2*x^2 + 7*x^3 + 18*x^4 + 49*x^5 + 128*x^6 + 337*x^7 + ...
		

Crossrefs

Programs

  • GAP
    a:=[0,1,2,7];; for n in [5..40] do a[n]:=3*a[n-1]-3*a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 07 2019
  • Magma
    I:=[0,1,2,7]; [n le 4 select I[n] else 3*Self(n-1) - 3*Self(n-3) +Self(n-4): n in [1..40]]; // G. C. Greubel, Jan 07 2019
    
  • Maple
    seq(coeff(series(x*(x^2-x+1)/((1-x)*(1+x)*(x^2-3*x+1)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Jan 08 2019
  • Mathematica
    (See A192872.)
    a[ n_] := SeriesCoefficient[ x * (1 - x + x^2) / ((1 - x^2) * (1 - 3*x + x^2)), {x, 0, Abs @ n}]; (* Michael Somos, Apr 08 2014 *)
    LinearRecurrence[{3,0,-3,1}, {0,1,2,7}, 40] (* G. C. Greubel, Jan 07 2019 *)
  • PARI
    concat(0, Vec(-x*(x^2-x+1)/((x-1)*(x+1)*(x^2-3*x+1)) + O(x^40))) \\ Colin Barker, Apr 01 2014
    
  • Sage
    (x*(x^2-x+1)/((1-x^2)*(x^2-3*x+1))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jan 07 2019
    

Formula

a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
G.f.: x*(x^2-x+1) / ((1-x)*(1+x)*(x^2-3*x+1)). - Colin Barker, Apr 01 2014
a(n) = (1/10) * (4L(2*n) - 3*(-1)^n - 5), with L(n) the Lucas numbers (A000032). - Ralf Stephan, Apr 06 2014
a(-n) = a(n) for all n in Z. - Michael Somos, Apr 08 2014

Extensions

More terms from Colin Barker, Apr 01 2014