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-6 of 6 results.

A260878 Number of set partitions of {1, 2, ..., 2*n} with sizes in {[n, n], [2n]}.

Original entry on oeis.org

2, 2, 4, 11, 36, 127, 463, 1717, 6436, 24311, 92379, 352717, 1352079, 5200301, 20058301, 77558761, 300540196, 1166803111, 4537567651, 17672631901, 68923264411, 269128937221, 1052049481861, 4116715363801, 16123801841551, 63205303218877, 247959266474053
Offset: 0

Views

Author

Peter Luschny, Aug 02 2015

Keywords

Comments

Third column in A260876.

Examples

			The set partitions counted by a(3) = 11 are: {{1, 2, 3, 4, 5, 6}},
{{1, 2, 4}, {3, 5, 6}}, {{1, 2, 3}, {4, 5, 6}}, {{1, 3, 4}, {2, 5, 6}},
{{1, 3, 5}, {2, 4, 6}}, {{1, 4, 5}, {2, 3, 6}}, {{1, 5, 6}, {2, 3, 4}},
{{1, 4, 6}, {2, 3, 5}}, {{1, 3, 6}, {2, 4, 5}}, {{1, 2, 6}, {3, 4, 5}},
{{1, 2, 5}, {3, 4, 6}}.
		

Crossrefs

a(n) = A112849(n) for n >= 2. - Alois P. Heinz, Aug 06 2015
a(n) = A052473(n+2) - 1.
a(n) = A088218(n) + 1.
a(n) = (-1)^n*A110556(n) + 1.
a(n+1) - a(n) = A097613(n+1) for n > 0.
Cf. A323230 (d=0), this sequence (d=1), A323229 (d=2).

Programs

  • Maple
    a := proc(n) option remember;
    if n < 2 then [2, 2][n+1] else ((4*n - 2)*a(n-1) - 3*n + 2)/n fi end:
    seq(a(n), n=0..26); # Or:
    egf := n -> exp(exp(x)*(1 - (GAMMA(n,x)/GAMMA(n)))):
    a := n -> `if`(n<2, 2, (2*n)!*coeff(series(egf(n), x, 2*n+1), x, 2*n)):
    seq(a(n), n=0..26); # Peter Luschny, Aug 02 2019
  • Mathematica
    Table[Binomial[2 n - 1, n] + 1, {n, 0, 26}] (* or *)
    CoefficientList[Series[(4 x^2 - 13 x + 3 + Sqrt[(1 - 4 x) (x - 1)^2])/(2 (4 x - 1) (x - 1)), {x, 0, 26}], x] (* Michael De Vlieger, Feb 26 2017 *)
  • Sage
    print([A260876(n,2) for n in (0..30)])
    
  • Sage
    # Alternative:
    def A260878():
        a, f, s, n = 2, 2, 1, 1
        yield a
        while True:
            yield a
            f += 4; s += 3; n += 1
            a = (f*a - s)/n
    a = A260878()
    print([next(a) for n in range(27)]) # Peter Luschny, Aug 02 2019

Formula

G.f.: (4*x^2 - 13*x + 3 + sqrt((1 - 4*x)*(x - 1)^2))/(2*(4*x - 1)*(x - 1)). - Alois P. Heinz, Aug 06 2015
a(n) = Binomial(2*n-1, n) + 1. - Vladimir Kruchinin, Feb 26 2017
The generating function G(x) satisfies the differential equation x^3 + 2*x = (4*x^4 - 9*x^3 + 6*x^2 - x)*diff(G(x), x) + (2*x^3 - 4*x^2 + 2*x)*G(x). - Peter Luschny, Feb 12 2019
From Peter Luschny, Aug 02 2019: (Start)
a(n) = ((4*n - 2)*a(n-1) - 3*n + 2)/n for n >= 2.
a(n) = (2*n)! * [x^(2*n)] exp(exp(x)*(1 - (Gamma(n,x)/Gamma(n)))) for n >= 2.
a(n) ~ 4^n/sqrt(4*Pi*n). More precise asymptotic estimates are:
1 + (4^n/sqrt(n*Pi)) * (1/2 - 1/(16*n) * (1 - 1/(16*n))), and
1 + 4^n*(2 - 2/N^2 + 21/N^4 - 671/N^6) / sqrt(2*N*Pi) with N = 8*n + 2.
Let b(n) = binomial(2*(n-1), n-1) + 1 = A323230(n) for n >= 0. Then by Salié:
p divides a(p+k) - b(k+1) if p is a prime > k and 0 <= k <= 4.
Conjecture: p divides a(p+5) - b(6) if p is a prime > b(6).
If p is a prime divisor of n then a(n) == a(n/p) (mod p) (by Salié, theorem 2).
(End)
From Peter Bala, Apr 20 2024: (Start)
a(n) = Sum_{k = 0..n} (-1)^k * 3*n/(2*n + k) * binomial(2*n+k, n-k) for n >= 1.
a(n) = Sum_{k = 0..n} (-1)^k * 3*n/(n + 2*k) * binomial(2*n+k-1, n-k) for n >= 1.
(-1)^n * a(n) equals the n-th order Taylor polynomial (centered at 0) of 1/c(x)^(3*n) evaluated at x = 1, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f. of the Catalan numbers A000108. (End)

A323229 a(n) = binomial(2*n, n+1) + 1.

Original entry on oeis.org

1, 2, 5, 16, 57, 211, 793, 3004, 11441, 43759, 167961, 646647, 2496145, 9657701, 37442161, 145422676, 565722721, 2203961431, 8597496601, 33578000611, 131282408401, 513791607421, 2012616400081, 7890371113951, 30957699535777, 121548660036301, 477551179875953
Offset: 0

Views

Author

Peter Luschny, Feb 12 2019

Keywords

Crossrefs

Cf. A323230 (d=0), A260878 (d=1), this sequence (d=2).
Cf. A212382.

Programs

  • Magma
    [Binomial(2*n, n+1) + 1: n in [0..30]]; // G. C. Greubel, Dec 26 2021
    
  • Maple
    aList := proc(len) local gf, ser; assume(Im(x) > 0);
    gf := (1-3*x)/(2*(x-1)*x) + (I*(1-2*x))/(2*x*sqrt(4*x-1));
    ser := series(gf, x, len+2):
    seq(coeff(ser, x, n), n=0..len) end: aList(27);
  • Mathematica
    Table[Binomial[2n, n+1] + 1, {n, 0, 26}]
  • Sage
    [binomial(2*n, n+1) + 1 for n in (0..30)] # G. C. Greubel, Dec 26 2021

Formula

Let G(x) = (1-3*x)/(2*(x-1)*x) + (I*(1-2*x))/(2*x*sqrt(4*x-1)) with Im(x) > 0, then a(n) = [x^n] G(x). The generating function G(x) satisfies the differential equation 6*x^3 - 4*x + 1 = (8*x^5 - 22*x^4 + 21*x^3 - 8*x^2 + x)*diff(G(x), x) + (4*x^4 - 14*x^3 + 17*x^2 - 8*x + 1)*G(x).
a(n) = A212382(2*n, n). - Alois P. Heinz, May 03 2019

A323211 Level 1 of Pascal's pyramid. T(n, k) triangle read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 5, 7, 5, 2, 1, 1, 2, 6, 11, 11, 6, 2, 1, 1, 2, 7, 16, 21, 16, 7, 2, 1, 1, 2, 8, 22, 36, 36, 22, 8, 2, 1, 1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1, 1, 2, 10, 37, 85, 127, 127, 85, 37, 10, 2, 1
Offset: 0

Views

Author

Peter Luschny, Feb 11 2019

Keywords

Comments

Pascal's pyramid is defined by recurrence. P(0) is Pascal's triangle. Now assume P(n-1) already constructed. Then P(n) is found by the steps: (1) Add 1 to each term of P(n-1). (2) Add at the left and at the right side a diagonal consisting all of 1s and complement the top with the rows 1 and 1, 1. A similar construction starting from the Pascal's triangle and subtracting 1 from all terms leads to A014473.

Examples

			Triangle starts:
                                1
                              1,  1
                            1,  2,  1
                          1,  2,  2,  1
                        1,  2,  3,  2,  1
                      1,  2,  4,  4,  2,  1
                    1,  2,  5,  7,  5,  2,  1
                 1,  2,  6,  11, 11,  6,  2,  1
               1,  2,  7,  16,  21, 16,  7,  2,  1
             1,  2,  8,  22, 36, 36,  22,  8,  2,  1
           1,  2,  9,  29, 57,  71,  57, 29,  9,  2,  1
		

Crossrefs

Differs from A323231 only in the second term.
Row sums are A323227.

Programs

  • Magma
    A323211:= func< n,k | n le 1 select 1 else 1 + Binomial(n-2,k-1) >;
    [A323211(n,k): k in [0..n], n in [0..13]]; // G. C. Greubel, Sep 26 2024
    
  • Maple
    T := (n, k) -> `if`(n=1, 1, binomial(n-2, k-1) + 1):
    seq(seq(T(n, k), k=0..n), n=0..10);
    # Alternative:
    T := proc(n, k) option remember;
    if k = n then return 1 fi; if k < 2 then return k+1 fi;
    T(n-1, k-1) + T(n-1, k) - 1 end:
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    A323211[n_, k_]:= If[n<2, 1, Binomial[n-2, k-1] +1];
    Table[A323211[n,k], {n,0,13}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 26 2024 *)
  • SageMath
    def A323211(n,k): return 1 if (n<2) else 1 + binomial(n-2,k-1)
    flatten([[A323211(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Sep 26 2024

Formula

T(n, k) = binomial(n-2, k-1) + 1 if n != 1 else 1.
G.f.: (1 + 3*y + y^2 + x^4*y^2*(1 + y)^2 + x^2*y*(2 + 5*y + 2*y^2) - x^3*y*(1 + 4*y + 4*y^2 + y^3) - x*(1 + 5*y + 5*y^2 + y^3)/((1 - x)*(1 + y)^2*(1 - x*y)*(1 - x - x*y)). - Stefano Spezia, Sep 26 2024
From G. C. Greubel, Sep 26 2024: (Start)
T(n, n-k) = T(n, k) (symmetry).
T(2*n, n) = A323230(n).
Sum_{k=0..n} (-1)^k*T(n, k) = (n+1 mod 2) - [n=2].
Sum_{k=0..floor(n/2)} T(n-k, k) = Fibonacci(n-2) + (1/4)*(2*n + 3 + (-1)^n) +[n=0] - [n=1]. (End)

A157531 Triangle T(n, k) = binomial(2*n, n) + binomial(n, k)^2, read by rows.

Original entry on oeis.org

2, 3, 3, 7, 10, 7, 21, 29, 29, 21, 71, 86, 106, 86, 71, 253, 277, 352, 352, 277, 253, 925, 960, 1149, 1324, 1149, 960, 925, 3433, 3481, 3873, 4657, 4657, 3873, 3481, 3433, 12871, 12934, 13654, 16006, 17770, 16006, 13654, 12934, 12871, 48621, 48701, 49916, 55676, 64496, 64496, 55676, 49916, 48701, 48621
Offset: 0

Views

Author

Roger L. Bagula, Mar 02 2009

Keywords

Examples

			Triangle begins as:
      2;
      3,     3;
      7,    10,     7;
     21,    29,    29,    21;
     71,    86,   106,    86,    71;
    253,   277,   352,   352,   277,   253;
    925,   960,  1149,  1324,  1149,   960,   925;
   3433,  3481,  3873,  4657,  4657,  3873,  3481,  3433;
  12871, 12934, 13654, 16006, 17770, 16006, 13654, 12934, 12871;
  48621, 48701, 49916, 55676, 64496, 64496, 55676, 49916, 48701, 48621;
		

Crossrefs

Programs

  • Magma
    [Binomial(2*n, n) + Binomial(n, k)^2: k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 09 2021
    
  • Maple
    A157531 := proc(n,k)
        binomial(2*n,n)+binomial(n,k)^2 ;
    end proc:
    seq(seq(A157531(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jan 12 2023
  • Mathematica
    T[n_, k_]:= T[n,k]= Sum[Binomial[n, j]^2, {j,0,k}] + Sum[Binomial[n, j]^2, {j, 0, n-k}];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten
  • Sage
    flatten([[binomial(2*n, n) + binomial(n, k)^2 for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 09 2021

Formula

T(n, k) = Sum_{j=0..k} binomial(n,j)*binomial(n,n-j) + Sum_{j=0..n-k} binomial(n,j)*binomial(n,n-j).
From G. C. Greubel, Dec 09 2021: (Start)
Sum_{k=0..n} T(n, k) = (n+2)*binomial(2*n, n).
T(n, k) = T(n, n-k).
T(n, 0) = 1 + binomial(2*n, n) = A323230(n+1).
T(2*n, n) = 2*A036910(n). (End)

Extensions

Edited by G. C. Greubel, Dec 09 2021

A323231 A(n, k) = [x^k] (1/(1-x) + x/(1-x)^n), square array read by descending antidiagonals for n, k >= 0.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 5, 7, 5, 2, 1, 1, 2, 6, 11, 11, 6, 2, 1, 1, 2, 7, 16, 21, 16, 7, 2, 1, 1, 2, 8, 22, 36, 36, 22, 8, 2, 1, 1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1, 1, 2, 10, 37, 85, 127, 127, 85, 37, 10, 2, 1
Offset: 0

Views

Author

Peter Luschny, Feb 10 2019

Keywords

Examples

			Array starts:
[0] 1, 2,  1,  1,   1,   1,    1,    1,    1,     1,     1, ...
[1] 1, 2,  2,  2,   2,   2,    2,    2,    2,     2,     2, ... A040000
[2] 1, 2,  3,  4,   5,   6,    7,    8,    9,    10,    11, ... A000027
[3] 1, 2,  4,  7,  11,  16,   22,   29,   37,    46,    56, ... A000124
[4] 1, 2,  5, 11,  21,  36,   57,   85,  121,   166,   221, ... A050407
[5] 1, 2,  6, 16,  36,  71,  127,  211,  331,   496,   716, ... A145126
[6] 1, 2,  7, 22,  57, 127,  253,  463,  793,  1288,  2003, ... A323228
[7] 1, 2,  8, 29,  85, 211,  463,  925, 1717,  3004,  5006, ...
[8] 1, 2,  9, 37, 121, 331,  793, 1717, 3433,  6436, 11441, ...
[9] 1, 2, 10, 46, 166, 496, 1288, 3004, 6436, 12871, 24311, ...
.
Read as a triangle (by descending antidiagonals):
                                     1
                                  2,   1
                                1,   2,   1
                             1,   2,   2,   1
                           1,   2,   3,   2,   1
                        1,   2,   4,   4,   2,   1
                      1,   2,   5,   7,   5,   2,  1
                    1,  2,   6,  11,  11,   6,   2,  1
                  1,  2,   7,  16,  21,  16,   7,  2,  1
                1,  2,  8,  22,  36,  36,  22,   8,  2,  1
              1,  2,  9,  29,  57,  71,  57,  29,  9,  2,  1
.
A(0, 1) = C(-1, 0) + 1 = 2 because C(-1, 0) = 1. A(1, 0) = C(-1, -1) + 1 = 1 because C(-1, -1) = 0. Warning: Some computer algebra programs (for example Maple and Mathematica) return C(n, n) = 1 for n < 0. This contradicts the definition given by Graham et al. (see reference). On the other hand this definition preserves symmetry.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 154.

Crossrefs

Differs from A323211 only in the second term.
Diagonals A(n, n+d): A323230 (d=0), A260878 (d=1), A323229 (d=2).
Antidiagonal sums are A323227(n) if n!=1.
Cf. A007318 (Pascal's triangle).

Programs

  • Julia
    using AbstractAlgebra
    function Arow(n, len)
        R, x = PowerSeriesRing(ZZ, len+2, "x")
        gf = inv(1-x) + divexact(x, (1-x)^n)
        [coeff(gf, k) for k in 0:len-1] end
    for n in 0:9 println(Arow(n, 11)) end
  • Maple
    Binomial := (n, k) -> `if`(n < 0 and n = k, 0, binomial(n,k)):
    A := (n, k) -> Binomial(n + k - 2, k - 1) + 1:
    seq(lprint(seq(A(n, k), k=0..10)), n=0..10);
  • Mathematica
    T[n_, k_]:= If[k==0, 1 + Boole[n==1], If[k==n, 1, Binomial[n-2, k-1] + 1]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 27 2021 *)
  • Sage
    def Arow(n):
        R. = PowerSeriesRing(ZZ, 20)
        gf = 1/(1-x) + x/(1-x)^n
        return gf.padded_list(10)
    for n in (0..9): print(Arow(n))
    

Formula

A(n, k) = binomial(n + k - 2, k - 1) + 1. Note that binomial(n, n) = 0 if n < 0.
A(n, k) = A(k, n) with the exception A(1,0) != A(0,1).
A(n, n) = binomial(2*n-2, n-1) + 1 = A323230(n).
From G. C. Greubel, Dec 27 2021: (Start)
T(n, k) = binomial(n-2, k-1) + 1 with T(n, 0) = 1 + [n=1], T(n, n) = 1.
T(2*n, n) = A323230(n).
Sum_{k=0..n} T(n,k) = n + 1 + 2^(n-2) - [n=0]/4 + [n=1]/2. (End)

A374891 Obverse convolution (1)**A000984; see Comments.

Original entry on oeis.org

2, 6, 42, 882, 62622, 15843366, 14655113550, 50311004817150, 647552943001537650, 31484671641677762080650, 5817013478501458288734652050, 4103513269179719224996951799587650, 11096544131445222000310082187517540861050
Offset: 0

Views

Author

Clark Kimberling, Jul 31 2024

Keywords

Comments

See A374848 for the definition of obverse convolution and a guide to related sequences. This is a divisibility sequence (see Formula).

Crossrefs

Programs

  • Mathematica
    s[n_] := 1; t[n_] := Binomial[2 n, n];
    u[n_] := Product[s[k] + t[n - k], {k, 0, n}]
    Table[u[n], {n, 0, 20}]

Formula

a(n+1) = a(n)*A244174(n+1) for n>=0 (conjectured) = a(n)*A323230(n+2) for n>=0 (conjectured).
a(n) ~ c * A007685(n), where c = Product_{k=0..oo} (1 + 1/binomial(2*k,k)) = 3.74782908533723753117687910314018231428739915473496578523053032212205053... - Vaclav Kotesovec, Jul 31 2024
Showing 1-6 of 6 results.