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.

A193146 Expansion of 1/(1 - x - x^2 + x^3 - x^4 + x^6).

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 8, 10, 15, 20, 29, 39, 55, 75, 105, 144, 200, 275, 381, 525, 726, 1001, 1383, 1908, 2635, 3636, 5020, 6928, 9564, 13200, 18221, 25149, 34714, 47914, 66136, 91285, 126000, 173914, 240051
Offset: 0

Views

Author

Johannes W. Meijer, Jul 20 2011

Keywords

Comments

The Gi2 sums, see A180662 for the definition of these sums, of the "Races with Ties" triangle A035317 equal this sequence.

Crossrefs

Programs

  • GAP
    a:=[1,1,2,2,4,5];; for n in [7..40] do a[n]:=a[n-1]+a[n-2]-a[n-3]+a[n-4]-a[n-6]; od; a; # G. C. Greubel, Jan 01 2020
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!(1/(1-x-x^2+x^3-x^4+x^6))); // Bruno Berselli, Jul 22 2011
    
  • Maple
    A193146 := proc(n) option remember: if n>=-5 and n<=-1 then 0 elif n=0 then 1 else procname(n-1) + procname(n-2) - procname(n-3) + procname(n-4) - procname(n-6) fi: end: seq(A193146(n), n=0..40);
  • Mathematica
    CoefficientList[Series[1/(1-x-x^2+x^3-x^4+x^6), {x, 0, 40}], x] (* Michael De Vlieger, Dec 24 2019 *)
    LinearRecurrence[{1,1,-1,1,0,-1},{1,1,2,2,4,5},50] (* Harvey P. Dale, Mar 27 2022 *)
  • Maxima
    makelist(coeff(taylor(1/(1-x-x^2+x^3-x^4+x^6), x, 0, n), x, n), n, 0, 40); /* Bruno Berselli, Jul 22 2011 */
    
  • PARI
    Vec(1/(1-x-x^2+x^3-x^4+x^6) +O(x^40)) /* show terms */ \\ Bruno Berselli, Jul 22 2011
    
  • Sage
    def A193146_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-x-x^2+x^3-x^4+x^6) ).list()
    A193146_list(40) # G. C. Greubel, Jan 01 2020
    

Formula

G.f.: 1/(1 - x - x^2 + x^3 - x^4 + x^6).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-6) with a(n) = 0 for n = -5, -4, -3, -2, -1 and a(0) = 1.
a(n) = b(n) + b(n-1) + b(n-3) - (1-(-1)^n)/2 with b(n) = A003269(n) and b(-3) = b(-2) = b(-1) = 0.
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n-3*k/2)+1, n-2*k+1). - Taras Goy, Dec 24 2019