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.

A235350 Series reversion of x*(1-2*x-x^2)/(1-x^2).

Original entry on oeis.org

1, 2, 8, 42, 248, 1570, 10416, 71474, 503088, 3612226, 26353720, 194806458, 1455874792, 10982013250, 83504148192, 639360351074, 4925190101600, 38144591091970, 296837838901992, 2319880586624714, 18200693844341720, 143294043656426082, 1131747417739664528
Offset: 1

Views

Author

Fung Lam, Jan 16 2014

Keywords

Comments

Derived series from A107841. The reversion has a quadratic power in x in the denominator. The general form reads x*(1-p*x-q*x^2)/(1-q*x^2).

Crossrefs

Programs

  • Mathematica
    Rest[CoefficientList[InverseSeries[Series[x*(1-2*x-x^2)/(1-x^2), {x, 0, 20}], x],x]] (* Vaclav Kotesovec, Jan 29 2014 *)
  • PARI
    Vec(serreverse(x*(1-2*x-x^2)/(1-x^2)+O(x^66))) \\ Joerg Arndt, Jan 17 2014
  • Python
    a = [0, 1]
    for n in range(20):
        m = len(a)
        d = 0
        for i in range (1, m):
            for j in range (1, m):
                if (i+j)%(m-1) == 0 and (i+j) < m:
                    d += a[i]*a[j]
        f = 0
        for i in range (1, m):
            for j in range (1, m):
                if (i+j)%m == 0 and (i+j) <= m:
                    f += a[i]*a[j]
        g = 0
        for i in range (1, m):
            for j in range (1, m):
                for k in range (1, m):
                    if (i+j+k)%m == 0 and (i+j+k) <= m:
                        g += a[i]*a[j]*a[k]
        y = g + 2*f - d
        a.append(y)
    print(a[1:]) # Edited by Andrey Zabolotskiy, Sep 04 2024
    

Formula

G.f.: (exp(4*Pi*i/3)*u + exp(2*Pi*i/3)*v - 2/3)/x, where i=sqrt(-1),
u = 1/3*(-17+3*x-6*x^2+x^3+3*sqrt(-6+54*x-30*x^2+18*x^3-3*x^4))^(1/3), and
v = 1/3*(-17+3*x-6*x^2+x^3-3*sqrt(-6+54*x-30*x^2+18*x^3-3*x^4))^(1/3).
D-finite with recurrence 6*n*(n-1)*a(n) -(n-1)*(52*n-75)*a(n-1) +(2*n+3)*(5*n-11)*a(n-2) +2*(5*n^2-62*n+150)*a(n-3) +(-13*n^2+130*n-321)*a(n-4) +(7*n-37)*(n-6)*a(n-5) -(n-6)*(n-7)*a(n-6)=0. - R. J. Mathar, Mar 24 2023