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.

A117905 Expansion of (1+2*x+2*x^2)/((1+x)*(1-x^3)^2).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 2, 4, 2, 2, 6, 2, 3, 7, 3, 3, 9, 3, 4, 10, 4, 4, 12, 4, 5, 13, 5, 5, 15, 5, 6, 16, 6, 6, 18, 6, 7, 19, 7, 7, 21, 7, 8, 22, 8, 8, 24, 8, 9, 25, 9, 9, 27, 9, 10, 28, 10, 10, 30, 10, 11, 31, 11, 11, 33, 11, 12, 34, 12, 12, 36
Offset: 0

Views

Author

Paul Barry, Apr 01 2006

Keywords

Comments

Diagonal sums of number triangle A117904.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 75); Coefficients(R!( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) )); // G. C. Greubel, Oct 18 2021
    
  • Mathematica
    LinearRecurrence[{-1,0,2,2,0,-1,-1}, {1,1,1,1,3,1,2}, 75] (* G. C. Greubel, Oct 10 2021 *)
  • PARI
    lista(n) = {my(x = 'x + 'x*O('x^n)); P = (1+2*x+2*x^2) / ((1-x^3)*(1+x-x^3-x^4)); Vec(P);}  \\ Michel Marcus, Mar 20 2013
    
  • Sage
    def A117905_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+2*x+2*x^2)/((1+x)*(1-x^3)^2) ).list()
    A117905_list(75) # G. C. Greubel, Oct 18 2021

Formula

a(n) = -a(n-1) + 2*a(n-3) + 2*a(n-4) - a(n-6) - a(n-7).
a(n) = Sum_{k=0..floor(n/2)} 0^abs(L(C(n-k,2)/3) - L(C(k,2)/3)), where L(j/p) is the Legendre symbol of j and p.
From G. C. Greubel, Oct 18 2021: (Start)
a(n) = (1/36)*(10*n + 23 + (-1)^n*(9 + 16*u(n, 1/2) - 4*u(n-1, 1/2) - 12*Sum_{j=0..n} u(n-j, 1/2)*u(j, 1/2))), where u(n, x) = ChebyshevU(n, x).
a(n) = (1/36)*(39 + 30*n + 9*(-1)^n - 48*floor((n+2)/3) - 12*floor((n+1)/3) - 12*b(n)), where b(n) = binomial(n+3, 3) - 6*A014125(n-1) + 9*A144677(n-2). (End)