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.

A192234 a(n) = 2*(a(n-1) + a(n-2) + a(n-3)) - a(n-4) for n >= 4, with initial terms 0,1,0,1.

Original entry on oeis.org

0, 1, 0, 1, 4, 9, 28, 81, 232, 673, 1944, 5617, 16236, 46921, 135604, 391905, 1132624, 3273345, 9460144, 27340321, 79014996, 228357577, 659965644, 1907336113, 5512303672, 15930853281, 46041020488, 133061018769, 384553481404, 1111380188041
Offset: 0

Views

Author

Clark Kimberling, Jun 26 2011

Keywords

Comments

With a different offset, constant term of the reduction of the n-th 1st-kind Chebyshev polynomial by x^2->x+1. See A192232.

Crossrefs

Cf. A192232.

Programs

  • GAP
    a:=[0,1,0,1];; for n in [5..40] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3] -a[n-4]; od; a; # G. C. Greubel, Jul 29 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1-2*x-x^2)/(1-2*x-2*x^2-2*x^3+x^4) )); // G. C. Greubel, Jul 29 2019
    
  • Mathematica
    q[x_]:= x + 1;
    reductionRules = {x^y_?EvenQ -> q[x]^(y/2), x^y_?OddQ -> x q[x]^((y - 1)/2)};
    t = Table[Last[Most[FixedPointList[Expand[#1 /. reductionRules] &, ChebyshevT[n, x]]]], {n, 1, 40}];
    Table[Coefficient[Part[t, n], x, 0], {n, 1, 40}]  (* A192234 *)
    Table[Coefficient[Part[t, n], x, 1], {n, 1, 40}]  (* A071101 *)
    (* Peter J. C. Moses, Jun 25 2011 *)
  • PARI
    a(n)=my(t=polchebyshev(n));while(poldegree(t)>1, t=substpol(t, x^2,x+1));subst(t,x,0) \\ Charles R Greathouse IV, Feb 09 2012
    
  • PARI
    concat(0, Vec(x*(1-2*x-x^2)/(1-2*x-2*x^2-2*x^3+x^4) + O(x^40))) \\ Colin Barker, Sep 09 2018
    
  • Sage
    (x*(1-2*x-x^2)/(1-2*x-2*x^2-2*x^3+x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jul 29 2019
    

Formula

G.f.: x*(1 - 2*x - x^2) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4). - Colin Barker, Feb 09 2012 and Sep 09 2018

Extensions

Entry revised (with new offset and initial terms) by N. J. A. Sloane, Sep 03 2018