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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, -2, 1, 0, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17, 18, -19, 20, -21, 22, -23, 24, -25, 26, -27, 28, -29, 30, -31, 32, -33, 34, -35, 36, -37, 38, -39, 40, -41, 42, -43, 44, -45, 46, -47, 48, -49, 50, -51, 52, -53, 54, -55, 56, -57
Offset: 0

Views

Author

Wolfdieter Lang, Oct 05 2014

Keywords

Comments

First column of Riordan triangle A248156.

Crossrefs

Cf. A038608, A097141, A248156 (row k=0).

Programs

  • Magma
    A248157:= func< n | n eq 0 select 1 else (-1)^n*(3-n) >; // G. C. Greubel, May 16 2025
    
  • Mathematica
    CoefficientList[Series[(1-2x^2)/(1+x)^2,{x,0,60}],x] (* or *) LinearRecurrence[{-2,-1},{1,-2,1},60] (* Harvey P. Dale, Aug 25 2023 *)
  • PARI
    Vec((1 - 2*x^2)/(1 + x)^2 + O(x^80)) \\ Michel Marcus, Oct 11 2014
    
  • SageMath
    def A248157(n): return (-1)^n*(3-n) - 2*int(n==0) # G. C. Greubel, May 16 2025

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^2 = -2 + 4/(1+x) - 1/(1+x)^2.
a(n) = -2*delta(n,0) + (-1)^n*(3 - n), n >= 0, with Kronecker delta(n,0) = 1 if n=0 else 0.
a(0) = 1, a(n) = -2*a(n-1) - a(n-2), n >= 3, with a(1) = -2, a(2) = 1.
a(n) = A038608(n-3) = A097141(n-1), n>=3.
E.g.f.: (3+x)*exp(-x) - 2. - G. C. Greubel, May 16 2025

A328748 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals, where T(n,k) is Sum_{i=0..n} (-2)^(n-i)*binomial(n,i)*Sum_{j=0..i} binomial(i,j)^k.

Original entry on oeis.org

1, 1, 0, 1, 0, -1, 1, 0, 0, 2, 1, 0, 2, 0, -3, 1, 0, 6, 0, 0, 4, 1, 0, 14, 12, 6, 0, -5, 1, 0, 30, 72, 90, 0, 0, 6, 1, 0, 62, 300, 882, 360, 20, 0, -7, 1, 0, 126, 1080, 6690, 8400, 2040, 0, 0, 8, 1, 0, 254, 3612, 44706, 124920, 95180, 10080, 70, 0, -9
Offset: 0

Views

Author

Seiichi Manyama, Oct 27 2019

Keywords

Comments

T(n,k) is the constant term in the expansion of (-2 + Product_{j=1..k-1} (1 + x_j) + Product_{j=1..k-1} (1 + 1/x_j))^n for k > 0.

Examples

			Square array begins:
    1, 1, 1,   1,    1,      1, ...
    0, 0, 0,   0,    0,      0, ...
   -1, 0, 2,   6,   14,     30, ...
    2, 0, 0,  12,   72,    300, ...
   -3, 0, 6,  90,  882,   6690, ...
    4, 0, 0, 360, 8400, 124920, ...
		

Crossrefs

Columns k=0..5 give A097141(n+1), A000007, A126869, A002898, A328735, A328751.
T(n,n+1) gives A328814.

Programs

  • Mathematica
    T[n_, k_] := Sum[(-2)^(n-i) * Binomial[n, i] * Sum[Binomial[i, j]^k, {j, 0, i}], {i, 0, n}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, May 06 2021 *)

A097140 Interleave n and 1-n.

Original entry on oeis.org

0, 1, 1, 0, 2, -1, 3, -2, 4, -3, 5, -4, 6, -5, 7, -6, 8, -7, 9, -8, 10, -9, 11, -10, 12, -11, 13, -12, 14, -13, 15, -14, 16, -15, 17, -16, 18, -17, 19, -18, 20, -19, 21, -20, 22, -21, 23, -22, 24, -23, 25, -24, 26, -25, 27, -26, 28, -27, 29, -28, 30, -29, 31, -30, 32, -31
Offset: 0

Views

Author

Paul Barry, Jul 29 2004

Keywords

Comments

Partial sums are A097141. Binomial transform is x(1+x)/(1-2x), or A003945 with a leading 0.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a097140 n = a097140_list !! n
    a097140_list = concat $ transpose [a001477_list, map (1 -) a001477_list]
    -- Reinhard Zumkeller, Nov 27 2012
    
  • Mathematica
    With[{nn=35},Riffle[Range[0,nn],Range[1,-(nn-1),-1]]] (* or *) LinearRecurrence[ {-1,1,1},{0,1,1},70] (* Harvey P. Dale, Mar 26 2012 *)
  • PARI
    a(n)=3/4+(2*n-3)*(-1)^n/4 \\ Charles R Greathouse IV, Sep 02 2015

Formula

G.f.: x*(1 + 2*x)/((1 - x)*(1 + x)^2).
a(n) = 3/4 + (2*n - 3)*(-1)^n/4.
a(0)=0, a(1)=1, a(2)=1, a(n)=a(n-1)+a(n-2)+a(n-3). - Harvey P. Dale, Mar 26 2012
G.f.: x*G(0)/(1+x) where G(k) = 1 + 2*x/(1 - x/(x + 2/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 21 2012
E.g.f.: ((3 + x)*sinh(x) - x*cosh(x))/2. - Stefano Spezia, Mar 07 2023
Showing 1-3 of 3 results.