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.

Previous Showing 21-30 of 79 results. Next

A054108 a(n) = (-1)^(n+1)*Sum_{k=0..n+1}(-1)^k*binomial(2*k,k).

Original entry on oeis.org

1, 5, 15, 55, 197, 727, 2705, 10165, 38455, 146301, 559131, 2145025, 8255575, 31861025, 123256495, 477823895, 1855782325, 7219352975, 28125910825, 109720617995, 428537256445, 1675561707275, 6557869020325, 25689734662775
Offset: 0

Views

Author

Keywords

Comments

p divides a((p-3)/2) for p in A045468 (primes congruent to {1, 4} mod 5). - Alexander Adamchuk, Jul 05 2006
The sequence 1,1,5,15,55,... has general term sum{k=0..n, (-1)^(n-k)*C(2k,k)}. Its Hankel transform is A082761. - Paul Barry, Apr 10 2007
From Paul Barry, Mar 29 2010: (Start)
The sequence 1,1,5,15,... has g.f. 1/((1+x)*sqrt(1-4x)).
The doubled sequence 1,1,1,1,5,5,... has e.g.f. dif(int((sin(x-t)+cos(x-t))*Bessel_I(0,2t),t,0,x),x). (End)

Crossrefs

T(2n, n), array T as in A054106.

Programs

  • Mathematica
    Table[Sum[(-1)^(k+n)*((2k)!/(k!)^2),{k,0,n}], {n,1,50}] (* Alexander Adamchuk, Jul 05 2006 *)
    CoefficientList[Series[(1/Sqrt[1-4*x]/(1+x)-1)/x, {x, 0, 20}], x]
    (* or *)
    Table[(-1)^(n+1)*Sum[(-1)^k*Binomial[2*k, k], {k, 0, n+1}], {n, 0, 20}] (* Vaclav Kotesovec, Nov 06 2012 *)
    Round@Table[Binomial[2 (n + 2), n + 2] Hypergeometric2F1[1, n + 5/2, n + 3, -4] - (-1)^n/Sqrt[5], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 16 2016 *)
  • PARI
    a(n)=(-1)^(n+1)*sum(k=0,n+1,(-1)^k*binomial(2*k,k))
    
  • Python
    from math import comb
    def A054108(n): return (1 if n % 2 else -1)*sum((-1 if k % 2 else 1)*comb(2*k,k) for k in range(n+2)) # Chai Wah Wu, Jan 19 2022

Formula

a(n) = C(2n, n) - a(n-1) with a(0)=1. - Labos Elemer, Apr 26 2003
C(2n,n) - C(2n-2,n-1) + ... +(-1)^(k+n)*C(2k,k)+ ... + (-1)^(1+n)*C(2,1) + (-1)^n*C(0,0), where C(2k,k)=(2k)!/(k!)^2 - central binomial coefficients A000984[k]. - Alexander Adamchuk, Jul 05 2006
a(n) = Sum_{k=0..n} (-1)^(k+n)*((2k)!/(k!)^2). - Alexander Adamchuk, Jul 05 2006
G.f.: (1/sqrt(1-4*x)/(1+x)-1)/x = (-1 + 2/(U(0)-2*x))/(1+x) where U(k)= 2*(2*k+1)*x + (k+1) - 2*(k+1)*(2*k+3)*x/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Jun 27 2012
a(n) ~ 2^(2*n+4)/(5*sqrt(Pi*n)). - Vaclav Kotesovec, Nov 06 2012
Recurrence: (n+1)*a(n) = (3*n+1)*a(n-1) + 2*(2*n+1)*a(n-2). - Vaclav Kotesovec, Nov 06 2012

Extensions

Formula from Benoit Cloitre, Sep 29 2002
Definition corrected by Vaclav Kotesovec, Nov 06 2012

A070925 Number of subsets of A = {1,2,...,n} that have the same center of gravity as A, i.e., (n+1)/2.

Original entry on oeis.org

1, 1, 3, 3, 7, 7, 19, 17, 51, 47, 151, 137, 471, 427, 1519, 1391, 5043, 4651, 17111, 15883, 59007, 55123, 206259, 193723, 729095, 688007, 2601639, 2465133, 9358943, 8899699, 33904323, 32342235, 123580883, 118215779, 452902071, 434314137, 1667837679, 1602935103
Offset: 1

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), May 20 2002

Keywords

Comments

From Gus Wiseman, Apr 15 2023: (Start)
Also the number of nonempty subsets of {0..n} with mean n/2. The a(0) = 1 through a(5) = 7 subsets are:
{0} {0,1} {1} {0,3} {2} {0,5}
{0,2} {1,2} {0,4} {1,4}
{0,1,2} {0,1,2,3} {1,3} {2,3}
{0,2,4} {0,1,4,5}
{1,2,3} {0,2,3,5}
{0,1,3,4} {1,2,3,4}
{0,1,2,3,4} {0,1,2,3,4,5}
(End)

Examples

			Of the 32 (2^5) sets which can be constructed from the set A = {1,2,3,4,5} only the sets {3}, {2, 3, 4}, {2, 4}, {1, 2, 4, 5}, {1, 2, 3, 4, 5}, {1, 3, 5}, {1, 5} give an average of 3.
		

Crossrefs

The odd bisection is A000980(n) - 1 = 2*A047653(n) - 1.
For median instead of mean we have A100066, bisection A006134.
Including the empty set gives A222955.
The one-based version is A362046, even bisection A047653(n) - 1.
A007318 counts subsets by length.
A067538 counts partitions with integer mean, strict A102627.
A231147 counts subsets by median.
A327481 counts subsets by integer mean.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; f[n_] := Block[{s = Subsets[n], c = 0, k = 2}, While[k < 2^n + 1, If[ (Plus @@ s[[k]]) / Length[s[[k]]] == (n + 1)/2, c++ ]; k++ ]; c]; Table[ f[n], {n, 1, 20}]
    (* second program *)
    Table[Length[Select[Subsets[Range[0,n]],Mean[#]==n/2&]],{n,0,10}] (* Gus Wiseman, Apr 15 2023 *)

Formula

From Gus Wiseman, Apr 18 2023: (Start)
a(2n+1) = A000980(n) - 1.
a(n) = A222955(n) - 1.
a(n) = 2*A362046(n) + 1.
(End)

Extensions

Edited by Robert G. Wilson v and John W. Layman, May 25 2002
a(34)-a(38) from Fausto A. C. Cariboni, Oct 08 2020

A079727 a(n) = 1 + C(2,1)^3 + C(4,2)^3 + ... + C(2n,n)^3.

Original entry on oeis.org

1, 9, 225, 8225, 351225, 16354233, 805243257, 41229480825, 2172976383825, 117106008311825, 6423711336265041, 357470875526646609, 20131502573232075025, 1145190201805448075025, 65706503254247744075025
Offset: 0

Views

Author

Benoit Cloitre, Feb 17 2003

Keywords

Comments

a(n) seems to have an interesting congruence property: For p prime, a(p) == 8 (mod p) if and only if p == 3, 5, 7, or 13 (mod 14); i.e., iff p = 7 or p is in A003625.
From Peter Bala, Jul 12 2024: (Start)
Zhi-Wei Sun (2010) conjectured that if p is an odd prime such that the Legendre symbol (p/7) = -1 (i.e., if p == 3, 5, 6 (mod 7)) then a(p-1) == 0 (mod p^2). Otherwise, if (p/7) = 1 then a(p-1) == 4*x^2 - 2*p (mod p^2) where p = x^2 + 7*y^2 with x, y in Z.
The author’s twin brother Zhi_Hong Sun confirmed the conjecture in the case (p/7) = -1.
Conjectures: if prime p is in A003625 then
1) a(p^2) == 8 + p^2 (mod p^3)
2) a(p*(p-1)) == p^2 (mod p^3)
3) a((p^2-1)/2) == p^2 (mod p^4) (all checked up to p = 101).
4) if n is a product of distinct primes from A003625 then a((n-1)/2) is divisible by n^2. (End)

Crossrefs

Cf. A002476.
Cf. Sum_{k = 0..n} binomial(2*k, k)^m: A006134 (m=1), A115257 (m=2), this sequence (m=3).

Programs

  • Magma
    [&+[Binomial(2*k, k)^3: k in [0..n]]: n in [0..20]]; // Vincenzo Librandi, Nov 16 2016
  • Mathematica
    Table[Sum[Binomial[2 k, k]^3, {k, 0, n}], {n, 0, 14}] (* Michael De Vlieger, Nov 15 2016 *)
  • Maxima
    makelist(sum(binomial(2*k,k)^3,k,0,n),n,0,12); /* Emanuele Munarini, Nov 15 2016 */
    
  • PARI
    a(n)=sum(k=0,n,binomial(2*k,k)^3)
    

Formula

a(n) = Sum_{k=0..n} binomial(2*k,k)^3.
G.f.: hypergeom([1/2, 1/2, 1/2], [1, 1], 64*x)/(1-x). - Vladeta Jovovic, Feb 18 2003
G.f.: hypergeom([1/4,1/4],[1],64*x)^2/(1-x). - Mark van Hoeij, Nov 17 2011
Recurrence: (n+2)^3*a(n+2)-(5*n+8)*(13*n^2+38*n+28)*a(n+1)+8*(2n+3)^3*a(n)=0. - Emanuele Munarini, Nov 15 2016
a(n) ~ 2^(6*n+6) / (63*Pi^(3/2)*n^(3/2)). - Vaclav Kotesovec, Nov 16 2016

A144635 a(n) = 5^n*Sum_{ k=0..n } binomial(2*k,k)/5^k.

Original entry on oeis.org

1, 7, 41, 225, 1195, 6227, 32059, 163727, 831505, 4206145, 21215481, 106782837, 536618341, 2693492305, 13507578125, 67693008145, 339066121115, 1697664211795, 8497396194275, 42522326235175, 212749477704695, 1064285646397915, 5323532330953295, 26625895085494075
Offset: 0

Views

Author

N. J. A. Sloane, Jan 21 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[5^n Sum[Binomial[2k,k]/5^k,{k,0,n}],{n,0,30}] (* Harvey P. Dale, Aug 08 2011 *)
    Round@Table[5^(n + 1/2) - 2^(n + 1) (2 n + 1)!! Hypergeometric2F1[1, n + 3/2, n + 2, 4/5]/(5 (n + 1)!), {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 14 2016 *)
  • PARI
    a(n) = 5^n*sum(k=0, n, binomial(2*k,k)/5^k); \\ Michel Marcus, Oct 14 2016

Formula

From Vaclav Kotesovec, Jun 12 2013: (Start)
G.f.: 1/((1-5*x)*sqrt(1-4*x)).
Recurrence: n*a(n) = (9*n-2)*a(n-1) - 10*(2*n-1)*a(n-2).
a(n) ~ 5^(n+1/2). (End)
a(n) = 5^(n+1/2) - 2^(n+1)*(2*n+1)!!*hypergeom([1,n+3/2], [n+2], 4/5)/(5*(n+1)!). - Vladimir Reshetnikov, Oct 14 2016
a(n) = Sum_{k=0..n} C(2*n+1,n-k)*A000032(2*k+1). - Vladimir Kruchinin Jan 14 2025

A362046 Number of nonempty subsets of {1..n} with mean n/2.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 9, 8, 25, 23, 75, 68, 235, 213, 759, 695, 2521, 2325, 8555, 7941, 29503, 27561, 103129, 96861, 364547, 344003, 1300819, 1232566, 4679471, 4449849, 16952161, 16171117, 61790441, 59107889, 226451035, 217157068, 833918839, 801467551, 3084255127
Offset: 0

Views

Author

Gus Wiseman, Apr 12 2023

Keywords

Examples

			The a(2) = 1 through a(7) = 8 subsets:
  {1}  {1,2}  {2}      {1,4}      {3}          {1,6}
              {1,3}    {2,3}      {1,5}        {2,5}
              {1,2,3}  {1,2,3,4}  {2,4}        {3,4}
                                  {1,2,6}      {1,2,4,7}
                                  {1,3,5}      {1,2,5,6}
                                  {2,3,4}      {1,3,4,6}
                                  {1,2,3,6}    {2,3,4,5}
                                  {1,2,4,5}    {1,2,3,4,5,6}
                                  {1,2,3,4,5}
		

Crossrefs

Using range 0..n gives A070925.
Including the empty set gives A133406.
Even bisection is A212352.
For median instead of mean we have A361801, the doubling of A079309.
A version for partitions is A361853, for median A361849.
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A007318 counts subsets by length.
A067538 counts partitions with integer mean, strict A102627.
A231147 appears to count subsets by median, full-steps A013580.
A327475 counts subsets with integer mean, A000975 integer median.
A327481 counts subsets by integer mean.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Mean[#]==n/2&]],{n,0,15}]

Formula

a(n) = (A070925(n) - 1)/2.
a(n) = A133406(n) - 1.
a(2n) = A212352(n) = A000980(n)/2 - 1.

A371965 a(n) is the sum of all peaks in the set of Catalan words of length n.

Original entry on oeis.org

0, 0, 0, 1, 6, 27, 111, 441, 1728, 6733, 26181, 101763, 395693, 1539759, 5997159, 23381019, 91244934, 356427459, 1393585779, 5453514729, 21358883439, 83718027429, 328380697629, 1288947615849, 5062603365999, 19896501060225, 78239857877649, 307831771279549, 1211767933187601
Offset: 0

Views

Author

Stefano Spezia, Apr 14 2024

Keywords

Examples

			a(3) = 1 because there is 1 Catalan word of length 3 with one peak: 010.
a(4) = 6 because there are 6 Catalan words of length 4 with one peak: 0010, 0100, 0101, 0110, 0120, and 0121 (see Figure 10 at p. 19 in Baril et al.).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, 0,
          a(n-1)+binomial(2*n-3, n-3))
        end:
    seq(a(n), n=0..28);  # Alois P. Heinz, Apr 15 2024
    # Second Maple program:
    A371965 := series((exp(2*x)*BesselI(0,2*x)-1)/2-exp(x)*(int(BesselI(0,2*x)*exp(x), x)), x = 0, 29):
    seq(n!*coeff(A371965, x, n), n = 0 .. 28); # Mélika Tebni, Jun 15 2024
  • Mathematica
    CoefficientList[Series[(1-3x-(1-x)Sqrt[1-4x])/(2(1-x) Sqrt[1-4x]),{x,0,28}],x]
  • Python
    from math import comb
    def A371965(n): return sum(comb((n-i<<1)-3,n-i-3) for i in range(n-2)) # Chai Wah Wu, Apr 15 2024

Formula

G.f.: (1 - 3*x - (1 - x)*sqrt(1 - 4*x))/(2*(1 - x)*sqrt(1 - 4*x)).
a(n) = Sum_{i=1..n-1} binomial(2*(n-i)-1,n-i-2).
a(n) ~ 2^(2*n)/(6*sqrt(Pi*n)).
a(n)/A371963(n) ~ 1.
a(n) - a(n-1) = A002054(n-2).
From Mélika Tebni, Jun 15 2024: (Start)
E.g.f.: (exp(2*x)*BesselI(0,2*x)-1)/2 - exp(x)*Integral_{x=-oo..oo} BesselI(0,2*x)*exp(x) dx.
a(n) = binomial(2*n,n)*(1/2 + hypergeom([1,n+1/2],[n+1],4)) + i/sqrt(3) - 0^n/2.
a(n) = (3*A106191(n) + A006134(n) + 4*0^n) / 8.
a(n) = A281593(n) - (A000984(n) + 0^n) / 2. (End)
Binomial transform of A275289. - Alois P. Heinz, Jun 20 2025

A094639 Partial sums of squares of Catalan numbers (A000108).

Original entry on oeis.org

1, 2, 6, 31, 227, 1991, 19415, 203456, 2248356, 25887400, 307993016, 3763786812, 47032778956, 598933188956, 7751562502556, 101741582076581, 1351906409905481, 18159677984049581, 246298405721739581
Offset: 0

Views

Author

André F. Labossière, May 27 2004

Keywords

Comments

Koshy and Salmassi give an elementary proof that the only prime Catalan numbers are A000108(2) = 2 and A000108(3) = 5. Franklin T. Adams-Watters showed that the only semiprime Catalan number is A000108(4) = 14. The subsequence of primes in the partial sum of squares of Catalan numbers begins: 2, 31, 227, 101741582076581. [Jonathan Vos Post, May 27 2010]
Conjecture: For any positive integer n, the polynomial P_n(x) = sum_{k = 0}^n(C_k)^2*x^k (with C_k = binomial(2k, k)/(k+1)) is irreducible over the field of rational numbers. [Zhi-Wei Sun, Mar 23 2013]

Crossrefs

Programs

  • Mathematica
    Accumulate[CatalanNumber[Range[0,20]]^2] (* Harvey P. Dale, May 01 2011 *)

Formula

a(n) = Sum_{k=0..n} ((2k)!/(k!)^2/(k+1))^2. - Alexander Adamchuk, Feb 16 2008
Sum_{i=1..n} [c(i)]^2 = Sum_{i=1..n} [C(2*i-2, i-1)/i]^2 = (1/(n-1)!)^2 * [ n^C(2*n-4, 1) + {2*C(n-1, 2)}*n^(2*n-5) + {C(n-2, 0) + 4*C(n-2, 1) + 13*C(n-2, 2) + 22*C(n-2, 3) + 12*C(n-2, 4)}*n^C(2*n-6, 1) + {12*C(n-3, 1) + 152*C(n-3, 2) + 458*C(n-3, 3) + 640*C(n-3, 4) + 440*C(n-3, 5) + 120*C(n-3, 6)}*n^(2*n-7) + {40*C(n-4, 0) + 313*C(n-4, 1) + 2332*C(n-4, 2) + 9536*C(n-4, 3) + 21409*C(n-4, 4) + 28068*C(n-4, 5) + 21700*C(n-4, 6) + 9240*C(n-4, 7) + 1680*C(n-4, 8) + ... + C(n-3, 0)*((n-1)!)^2 ].
Recurrence: (n+1)^2*a(n) = (17*n^2 - 14*n + 5)*a(n-1) - 4*(2*n - 1)^2*a(n-2). - Vaclav Kotesovec, Jul 01 2016
a(n) ~ 2^(4*n+4) /(15*Pi*n^3). - Vaclav Kotesovec, Jul 01 2016

A100066 Expansion of x/((1-x)*sqrt(1-4*x^2)).

Original entry on oeis.org

0, 1, 1, 3, 3, 9, 9, 29, 29, 99, 99, 351, 351, 1275, 1275, 4707, 4707, 17577, 17577, 66197, 66197, 250953, 250953, 956385, 956385, 3660541, 3660541, 14061141, 14061141, 54177741, 54177741, 209295261, 209295261, 810375651, 810375651
Offset: 0

Views

Author

Paul Barry, Nov 02 2004

Keywords

Comments

An inverse Chebyshev transform of x/(1-x+x^2), where the Chebyshev transform of g(x) is ((1-x^2)/(1+x^2))*g(x/(1+x^2)) and the inverse transform maps a g.f. A(x) to (1/sqrt(1-4*x^2))*A(x*c(x^2)) where c(x) is the g.f. of the Catalan numbers A000108.
Hankel transform of a(n+1) is A120582. The Hankel transform of a(n) is (-1)*[x^n] x/(1+2*x-4*x^2). - Paul Barry, Mar 29 2010

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40);
    [0] cat Coefficients(R!( x/((1-x)*Sqrt(1-4*x^2)) )); // G. C. Greubel, Mar 17 2025
    
  • Maple
    a:=n->sum(binomial(2*j,j), j=0..n): seq(a(n/2), n=-1..40); # Zerinvary Lajos, Apr 30 2007
  • Mathematica
    CoefficientList[Series[x/((1-x)*Sqrt[1-4*x^2]), {x, 0, 40}], x] (* Vaclav Kotesovec, Feb 12 2014 *)
  • PARI
    my(x='x+O('x^41)); concat(0, Vec(x/((1-x)*sqrt(1-4*x^2)))) \\ G. C. Greubel, Jan 30 2017; Mar 17 2025
    
  • SageMath
    def b(n): return sum(binomial(2*k,k) for k in range(n+1))
    def A100066(n): return b((n-1)//2)
    print([A100066(n) for n in range(41)]) # G. C. Greubel, Mar 17 2025

Formula

a(n) = Sum_{k=0..n} if(mod(n-k, 2)=0, binomial(n, (n-k)/2) * 2*sin(Pi*k/3) / sqrt(3)).
a(n) = Sum_{k=0..n} binomial(n, (n-k)/2)*(1+(-1)^(n-k))*sin(Pi*k/3)/sqrt(3).
a(n) = Sum_{k=0..n} binomial(n-1, (n-1)/2)*(1-(-1)^k)/2.
a(n+1) = Sum_{k=0..floor(n/2)} binomial(2k, k) = Sum{k=0..n} binomial(k, k/2)*(1+(-1)^k)/2.
a(2n-1) = a(2n) = A006134(n-1) = Sum_{k=0..n}( (2*k)!/(k!)^2 ) for n > 0. - Alexander Adamchuk, Feb 23 2007
From Paul Barry, Mar 29 2010: (Start)
G.f.: x*(1+x)/((1-x^2)*sqrt(1-4*x^2)) = x/((1-x)*sqrt(1-4*x^2)).
E.g.f.: Integral_{t=0..x} exp(x-t)*Bessel_I(0,2t). (End)
D-finite with recurrence: (n-1)*a(n) - (n-1)*a(n-1) - 4*(n-2)*a(n-2) + 4*(n-2)*a(n-3) = 0. - R. J. Mathar, Nov 24 2012
a(n) ~ (3-(-1)^n) * 2^(n+1/2) / (6*sqrt(Pi*n)). - Vaclav Kotesovec, Feb 12 2014

A167713 a(n) = 16^n * Sum_{k=0..n} binomial(2*k, k) / 16^k.

Original entry on oeis.org

1, 18, 294, 4724, 75654, 1210716, 19372380, 309961512, 4959397062, 79350401612, 1269606610548, 20313706474200, 325019306291356, 5200308911062296, 83204942617113336, 1331279082028930896, 21300465313063974726, 340807445011357201836, 5452919120190790364676
Offset: 0

Views

Author

Alexander Adamchuk, Nov 10 2009

Keywords

Comments

p^2 divides a((p-3)/2) for prime p of the form p = 6k + 1 (A002476).
The expression a(n) = B^n*Sum_{k=0..n} binomial(2*k,k)/B^k gives A006134 for B=1, A082590 (B=2), A132310 (B=3), A002457 (B=4), A144635 (B=5), a(n) = A167713 (B=16).

Crossrefs

Programs

  • Maple
    A167713 := proc(n) coeftayl( 1/(1-16*x)/sqrt(1-4*x),x=0,n) ; end proc: seq(A167713(n),n=0..40) ; # R. J. Mathar, Nov 13 2009
  • Mathematica
    Table[ 16^n * Sum[ (2k)!/(k!)^2 / 16^k, {k,0,n} ], {n,0,20} ]
    CoefficientList[Series[1 / ((1 - 16 x) Sqrt[1 - 4 x]), {x, 0, 20}], x] (* Vincenzo Librandi, May 27 2013 *)

Formula

a(n) = 16^n * Sum_{k=0..n} ((2k)!/(k!)^2) / 16^k.
a(n) = 16^n * Sum_{k=0..n} binomial(2k,k) / 16^k.
G.f.: 1/((1-16*x)*sqrt(1-4*x)). - R. J. Mathar, Nov 13 2009
From Vaclav Kotesovec, Oct 20 2012: (Start)
Recurrence: n*a(n) = 2*(10*n-1)*a(n-1) - 32*(2*n-1)*a(n-2).
a(n) ~ 2^(4*n+1)/sqrt(3). (End)

Extensions

Extended by R. J. Mathar, Nov 13 2009

A361654 Triangle read by rows where T(n,k) is the number of nonempty subsets of {1,...,2n-1} with median n and minimum k.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 15, 9, 4, 1, 50, 29, 14, 5, 1, 176, 99, 49, 20, 6, 1, 638, 351, 175, 76, 27, 7, 1, 2354, 1275, 637, 286, 111, 35, 8, 1, 8789, 4707, 2353, 1078, 441, 155, 44, 9, 1, 33099, 17577, 8788, 4081, 1728, 650, 209, 54, 10, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 23 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			Triangle begins:
     1
     2     1
     5     3     1
    15     9     4     1
    50    29    14     5     1
   176    99    49    20     6     1
   638   351   175    76    27     7     1
  2354  1275   637   286   111    35     8     1
  8789  4707  2353  1078   441   155    44     9     1
Row n = 4 counts the following subsets:
  {1,7}            {2,6}        {3,5}    {4}
  {1,4,5}          {2,4,5}      {3,4,5}
  {1,4,6}          {2,4,6}      {3,4,6}
  {1,4,7}          {2,4,7}      {3,4,7}
  {1,2,6,7}        {2,3,5,6}
  {1,3,5,6}        {2,3,5,7}
  {1,3,5,7}        {2,3,4,5,6}
  {1,2,4,5,6}      {2,3,4,5,7}
  {1,2,4,5,7}      {2,3,4,6,7}
  {1,2,4,6,7}
  {1,3,4,5,6}
  {1,3,4,5,7}
  {1,3,4,6,7}
  {1,2,3,5,6,7}
  {1,2,3,4,5,6,7}
		

Crossrefs

Row sums appear to be A006134.
Column k = 1 appears to be A024718.
Column k = 2 appears to be A006134.
Column k = 3 appears to be A079309.
A000975 counts subsets with integer median, mean A327475.
A007318 counts subsets by length.
A231147 counts subsets by median, full steps A013580, by mean A327481.
A359893 and A359901 count partitions by median.
A360005(n)/2 gives the median statistic.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[2n-1]],Min@@#==k&&Median[#]==n&]],{n,6},{k,n}]
  • PARI
    T(n,k) = sum(j=0, n-k, binomial(2*j+k-2, j)) \\ Andrew Howroyd, Apr 09 2023

Formula

T(n,k) = 1 + Sum_{j=1..n-k} binomial(2*j+k-2, j). - Andrew Howroyd, Apr 09 2023
Previous Showing 21-30 of 79 results. Next