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.

A138187 Hankel transform of binomial(2*n+3, n).

Original entry on oeis.org

1, -4, 3, 3, -8, 5, 5, -12, 7, 7, -16, 9, 9, -20, 11, 11, -24, 13, 13, -28, 15, 15, -32, 17, 17, -36, 19, 19, -40, 21, 21, -44, 23, 23, -48, 25, 25, -52, 27, 27, -56, 29, 29, -60, 31, 31, -64, 33, 33, -68, 35, 35, -72, 37, 37, -76, 39, 39, -80, 41
Offset: 0

Views

Author

Paul Barry, Mar 04 2008

Keywords

Comments

Hankel transform of A002054(n+1).
Hankel transform of A002054(n) is A057078(n+1).
Partial sums are A138188.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 65); Coefficients(R!( (1-2*x-2*x^2-x^3)/(1+x+x^2)^2 )); // G. C. Greubel, Jun 16 2021
    
  • Mathematica
    a[n_]:= a[n]= Sum[(-1)^(n-k+1)*(n+k+2)*Binomial[n+k+1, 2*k], {k, 0, n+1}];
    Table[a[n], {n, 0, 65}] (* G. C. Greubel, Jun 16 2021 *)
  • Sage
    @CachedFunction
    def A138187(n):
        if (n%3==0): return 2*(n//3) +1
        elif (n%3==1): return -4*((n//3) +1)
        else: return 2*(n//3) +3
    [A138187(n) for n in (0..65)] # G. C. Greubel, Jun 16 2021

Formula

G.f.: (1 -2*x -2*x^2 -x^3)/(1 +x +x^2)^2.
a(n) = Sum_{k=0..n} (-1)^(n-k+1)*(n+k+2)*binomial(n+k+1, 2*k). - Paul Barry, Apr 19 2010
a(n) = 2*floor(n/3) + 1 if (n mod 3) = 0, -4*(floor(n/3) + 1) if (n mod 3) = 1 and 2*floor(n/3) + 3 if (n mod 3) = 2. - G. C. Greubel, Jun 16 2021