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.

A346051 G.f. A(x) satisfies: A(x) = 1 + x^2 + x^3 * A(x/(1 - x)) / (1 - x).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 5, 12, 28, 68, 181, 531, 1671, 5491, 18627, 65299, 237880, 903907, 3580619, 14729777, 62639952, 274442521, 1236730244, 5729809348, 27292248240, 133614280479, 671803041553, 3464970976743, 18309428363425, 99010800275743, 547462187824465, 3093329527120022
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 02 2021

Keywords

Crossrefs

Programs

  • Magma
    function a(n)
      if n lt 3 then return (1+(-1)^n)/2;
      else return (&+[Binomial(n-3,j)*a(j): j in [0..n-3]]);
      end if; return a;
    end function;
    [a(n): n in [0..35]]; // G. C. Greubel, Nov 30 2022
    
  • Mathematica
    nmax = 31; A[] = 0; Do[A[x] = 1 + x^2 + x^3 A[x/(1 - x)]/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[1] = 0; a[2] = 1; a[n_] := a[n] = Sum[Binomial[n - 3, k] a[k], {k, 0, n - 3}]; Table[a[n], {n, 0, 31}]
  • SageMath
    @CachedFunction
    def a(n): # a = A346051
        if (n<3): return (1, 0, 1)[n]
        else: return sum(binomial(n-3, k)*a(k) for k in range(n-2))
    [a(n) for n in range(51)] # G. C. Greubel, Nov 30 2022

Formula

a(0) = 1, a(1) = 0, a(2) = 1; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).