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

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

A133406 Half the number of ways of placing up to n pawns on a length n chessboard row so that the row balances at its middle.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 10, 9, 26, 24, 76, 69, 236, 214, 760, 696, 2522, 2326, 8556, 7942, 29504, 27562, 103130, 96862, 364548, 344004, 1300820, 1232567, 4679472, 4449850, 16952162, 16171118, 61790442, 59107890, 226451036, 217157069, 833918840
Offset: 1

Views

Author

R. H. Hardin, Nov 24 2007

Keywords

Comments

Odd-indexed terms are A047653.
Also the number of subsets of {1..n-1} that are empty or have mean (n-1)/2. - Gus Wiseman, Apr 23 2023

Examples

			From _Gus Wiseman_, Apr 23 2023: (Start)
The a(1) = 1 through a(8) = 9 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}
(End)
		

Crossrefs

For median instead of mean we have A361801 + 1, the doubling of A024718.
Not counting the empty set gives A362046 (shifted left).
A007318 counts subsets by length, A327481 by integer mean.
A047653 counts subsets of {1..2n} with mean n, nonempty A212352.
A070925 counts subsets of {1..2n-1} with mean n, nonempty A000980.
A327475 counts subsets with integer mean, nonempty A051293.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[#]==0||Mean[#]==n/2&]],{n,0,10}] (* Gus Wiseman, Apr 23 2023 *)
  • PARI
    a(n) = {polcoef(prod(k=1, n, 1 + 'x^(2*k-n-1)), 0)/2} \\ Andrew Howroyd, Jan 07 2023

Formula

From Gus Wiseman, Apr 23 2023: (Start)
a(2n+1) = A000980(n)/2 = A047653(n).
a(n) = A362046(n-1) + 1.
(End)

A212352 Row sums of A047997.

Original entry on oeis.org

0, 1, 3, 9, 25, 75, 235, 759, 2521, 8555, 29503, 103129, 364547, 1300819, 4679471, 16952161, 61790441, 226451035, 833918839, 3084255127, 11451630043, 42669225171, 159497648599, 597950875255, 2247724108771, 8470205600639
Offset: 0

Views

Author

N. J. A. Sloane, May 16 2012

Keywords

Comments

Also the number of nonempty subsets of {1..2n} with mean n, even bisection of A362046. - Gus Wiseman, Apr 15 2023

Examples

			From _Gus Wiseman_, Apr 15 2023: (Start)
The a(1) = 1 through a(3) = 9 subsets:
  {1}  {2}      {3}
       {1,3}    {1,5}
       {1,2,3}  {2,4}
                {1,2,6}
                {1,3,5}
                {2,3,4}
                {1,2,3,6}
                {1,2,4,5}
                {1,2,3,4,5}
(End)
		

Crossrefs

Equals A047653(n) - 1.
Row sums of A047997.
For median instead of mean we have A079309, bisection of A361801.
Even bisection of A362046, zero-based version A070925.
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A007318 counts subsets by length.
A327475 counts subsets with integer mean.
A327481 counts subsets by mean.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[2n]],Mean[#]==n&]],{n,0,6}] (* Gus Wiseman, Apr 15 2023 *)

Formula

From Gus Wiseman, Apr 15 2023: (Start)
a(n) = A000980(n)/2 - 1.
a(n) = A047653(n) - 1.
a(n) = A133406(2n+1) - 1.
a(n) = A362046(2n).
(End)

A281593 a(n) = b(n) - Sum_{j=0..n-1} b(j) with b(n) = binomial(2*n, n).

Original entry on oeis.org

1, 1, 3, 11, 41, 153, 573, 2157, 8163, 31043, 118559, 454479, 1747771, 6740059, 26055459, 100939779, 391785129, 1523230569, 5931153429, 23126146629, 90282147849, 352846964649, 1380430179489, 5405662979649, 21186405207549, 83101804279101, 326199124351701
Offset: 0

Views

Author

Peter Luschny, Feb 25 2017

Keywords

Crossrefs

A279561(n) = (a(n)+1)/2.
A057552(n) = (a(n+2)-1)/2.
A162551(n) = a(n+1)-a(n).

Programs

  • Maple
    b := n -> binomial(2*n, n): s := n -> add(b(j), j=0..n):
    a := n -> b(n) - s(n-1): seq(a(n), n=0..26);
    # second program:
    A281593 := series(exp(2*x)*BesselI(0, 2*x) - exp(x)*int(BesselI(0, 2*x)*exp(x), x), x = 0, 27): seq(n!*coeff(A281593, x, n), n=0..26); # Mélika Tebni, Feb 27 2024
  • Mathematica
    a[n_] = Binomial[2n,n](1+Hypergeometric2F1[1,n+1/2,n+1,4])+I/Sqrt[3];
    Table[Simplify[a[n]],{n,0,17}]
    CoefficientList[Series[(2x -1)/((x -1) Sqrt[(1 -4x)]), {x, 0, 26}], x] (* Robert G. Wilson v, Feb 25 2017 *)
    a[0]=1; a[n_]:=a[n-1] + 2*(n-1)*CatalanNumber[n-1];Table[a[n],{n,0,26}] (* Indranil Ghosh, Mar 03 2017 *)
  • PARI
    a(n) = binomial(2*n,n)-sum(j=0,n-1,binomial(2*j,j)); \\ Indranil Ghosh, Mar 03 2017
    
  • PARI
    c(n) = binomial(2*n,n)/(n+1);
    a(n) = if(n==0,1,a(n-1) + 2*(n-1)*c(n-1)); \\ Indranil Ghosh, Mar 03 2017
    
  • Python
    import math
    def C(n,r): return f(n)/f(r)/f(n-r)
    def A281593(n):
        s=0
        for j in range(0,n):
            s+=C(2*j,j)
        return C(2*n,n)-s # Indranil Ghosh, Mar 03 2017
  • Sage
    def A():
        a = b = c = 1
        yield 1
        while True:
            yield a
            c = (c * (4 * b - 2)) // (b + 1)
            a += 2 * b * c
            b += 1
    a = A(); print([next(a) for  in (0..25)]) # _Peter Luschny, Feb 25 2017
    

Formula

a(n) = [x^n] (2*x-1)/(sqrt(1-4*x)*(x-1)).
a(n) = binomial(2*n,n)*(1+hypergeom([1,n+1/2],[n+1],4))+I/sqrt(3).
a(n+1) = a(n) + 2*n*Catalan(n).
a(n) ~ (4/3)*4^n/sqrt((8*n+2)*Pi/2).
D-finite with recurrence n*a(n) +(-7*n+6)*a(n-1) +2*(7*n-13)*a(n-2) +4*(-2*n+5)*a(n-3)=0. - R. J. Mathar, Jul 27 2022
E.g.f.: exp(2*x)*BesselI(0,2*x) - exp(x)*integral( BesselI(0,2*x)*exp(x) ) dx. - Mélika Tebni, Feb 27 2024

A306409 a(n) = -Sum_{0<=i

Original entry on oeis.org

0, 1, 3, 10, 34, 120, 434, 1597, 5949, 22363, 84655, 322245, 1232205, 4729453, 18210279, 70307546, 272087770, 1055139408, 4099200524, 15951053566, 62159391150, 242542955378, 947504851414, 3705431067156, 14505084243860, 56831711106496, 222853334131080
Offset: 0

Views

Author

Seiichi Manyama, Apr 05 2019

Keywords

Examples

			n | a(n) | A307354 | A006134 | A120305
--+------+---------+---------+---------
0 |    0 |       1 |       1 |       1
1 |    1 |       2 |       3 |       1
2 |    3 |       6 |       9 |       3
3 |   10 |      19 |      29 |       9
4 |   34 |      65 |      99 |      31
5 |  120 |     231 |     351 |     111
		

Crossrefs

Partial sums of A014300. - Seiichi Manyama, Jan 30 2023

Programs

  • Mathematica
    Table[-Sum[Sum[(-1)^(i+j) * (i+j)!/(i!*j!), {i, 0, j-1}], {j, 0, n}], {n, 0, 25}] (* Vaclav Kotesovec, Apr 05 2019 *)
  • PARI
    a(n) = -sum(i=0, n, sum(j=i+1, n, (-1)^(i+j)*(i+j)!/(i!*j!)));
    
  • PARI
    my(N=30, x='x+O('x^N)); concat(0, Vec((1-sqrt(1-4*x))/(sqrt(1-4*x)*(1-x)*(3-sqrt(1-4*x))))) \\ Seiichi Manyama, Jan 30 2023

Formula

a(n) = A006134(n) - A307354(n).
a(n) = (A006134(n) - A120305(n))/2.
a(n) ~ 4^(n+1) / (9*sqrt(Pi*n)). - Vaclav Kotesovec, Apr 05 2019
G.f.: ( 1/(sqrt(1-4*x) * (1-x)) ) * ( x *c(x)/(1 + x *c(x)) ), where c(x) is the g.f. of A000108. - Seiichi Manyama, Jan 30 2023

A378816 Expansion of 2*(x - 1)^3/(3*x^3 - 5*x^2 + x + 1 + sqrt(-(x - 1)^3*(x + 1)^2*(3*x + 1))).

Original entry on oeis.org

-1, 4, -11, 30, -83, 232, -654, 1856, -5296, 15180, -43675, 126062, -364863, 1058552, -3077533, 8963862, -26151753, 76409052, -223544241, 654790218, -1920055017, 5635816776, -16557539124, 48685404516, -143264248974, 421879104836, -1243160223829, 3665516301186
Offset: 0

Views

Author

Thomas Scheuerle, Dec 08 2024

Keywords

Comments

Binomial transform of A057552(n)*(-1)^(n+1).

Crossrefs

Cf. A025566, A057552, A378783, A378816 ( Hankel sequence transform ).

Programs

  • PARI
    a(n) = sum(k=1, n+1, binomial(n, k-1)*(-1)^k*sum(m=0, k-1, binomial(2*m+2, m)))

Formula

G.f. A(x) satisfies: (-3*x^3 - x^2)*A(x)^2 + (3*x^3 - 5*x^2 + x + 1)*A(x) + (-x^3 + x*y^2 - x*y + 1) = 0.
a(n) = Limit_{k->oo} (A378783(k, k-n) - A378783(k, k-n-1)).
a(n) = A025566(n+1)+A025566(n+2)*(-1)^(n+1), for n > 0.
a(n) = Sum_{k=1..n+1} binomial(n, k-1)*(-1)^k*Sum_{m=0..k-1} binomial(2*m+2, m).

A306432 a(n) = Sum_{0<=i

Original entry on oeis.org

0, 0, 3, 77, 1777, 41088, 964199, 22962721, 553886872, 13504654074, 332253097450, 8237141855085, 205552200503455, 5158397884289338, 130087682458168777, 3294763277704155587, 83764781257030939439, 2136808562574516060202, 54674217200832983666877
Offset: 0

Views

Author

Seiichi Manyama, Apr 05 2019

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(n) local i,j;
      add(add((i+j+n)!/(i!*j!*n!),j=i+1..n-1),i=0..n-2)
    end proc:
    ListTools:-PartialSums(map(g,[$0..30])); # Robert Israel, May 16 2019
  • Mathematica
    Table[Sum[Sum[Sum[(i + j + k)!/(i!*j!*k!), {i, 0, j-1}], {j, 0, k-1}], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Apr 05 2019 *)
  • PARI
    {a(n) = sum(i=0, n, sum(j=i+1, n, sum(k=j+1, n, (i+j+k)!/(i!*j!*k!))))}

Formula

a(n) ~ 3^(3*n + 7/2) / (832*Pi*n). - Vaclav Kotesovec, Apr 05 2019

A057553 Rank of (1,1,...,1) (n 1's) when {0,1,2,...}^n is lexicographically ordered.

Original entry on oeis.org

1, 5, 16, 56, 203, 749, 2795, 10517, 39832, 151658, 579956, 2225964, 8570330, 33086030, 128028650, 496432760, 1928418395, 7503144365, 29235705215, 114064338335, 445552419545, 1742264571605, 6819546853625, 26717004445325
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2000

Keywords

Examples

			For n=3, the ordering starts (0,0,0), (0,0,1), ... and the 15th term is (1,1,1).
		

Formula

a(n)=C(2n-1, n)+b(n-2)+1, where b=A057552.
Previous Showing 21-28 of 28 results.