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

A097070 Consider all compositions (ordered partitions) of n into n parts, allowing zeros. E.g., for n = 3 we get 300, 030, 003, 210, 120, 201, 102, 021, 012, 111. Then a(n) is the total number of 1's.

Original entry on oeis.org

1, 2, 9, 40, 175, 756, 3234, 13728, 57915, 243100, 1016158, 4232592, 17577014, 72804200, 300874500, 1240940160, 5109183315, 21002455980, 86213785350, 353452638000, 1447388552610, 5920836618840, 24197138082780, 98801168731200, 403095046038750, 1643337883690776, 6694900194799404
Offset: 1

Views

Author

Amy J. Kolan, Sep 15 2004

Keywords

Comments

Number of compositions of n into n parts, allowing zeros = binomial(2*n-1,n) = A088218 = essentially A001700.

Examples

			The compositions for n=2 are 20, 02, 11. There are two 1's in these so a(2) = 2.
From _Robert G. Wilson v_, Sep 16 2004: (Start)
The case n = 5:
A. There are 5 combinations associated with the numbers 50000: 50000, 05000, 00500, 00050, 00005.
B. There are 20 combinations associated with the numbers 41000.
C. There are 20 combinations associated with 32000.
D. There are 30 combinations associated with 31100.
E. There are 30 combinations associated with 22100.
F. There are 20 combinations associated with 21110.
G. There is one combinations associated with 11111.
The number of 1's associated with A is 0, with B 20, with C 0, with D 60, with E 30, with F 60 and with G 5. 0 + 20 + 0 + 60 + 30 + 60 + 5 = 175.
(End)
		

Crossrefs

Programs

  • GAP
    List([1..30], n-> n*Binomial(2*n-3, n-1)); # G. C. Greubel, Jul 27 2019
  • Magma
    [n*Binomial(2*n-3, n-1): n in [1..30]]; // Vincenzo Librandi, Jul 13 2019
    
  • Maple
    A097070 := n -> ifelse(n=1, 1, 2^(n-2)*JacobiP(n-1, -1/2, -n+2, 3)):
    seq(simplify(A097070(n)), n = 1..28);  # Peter Luschny, Jan 22 2025
  • Mathematica
    Table[n*Binomial[2n-3, n-1], {n, 30}] (* Robert G. Wilson v, Sep 17 2004 *)
  • PARI
    a(n) = n*binomial(2*n-3, n-1); \\ Joerg Arndt, Feb 17 2015
    
  • Sage
    [n*binomial(2*n-3, n-1) for n in (1..30)] # G. C. Greubel, Jul 27 2019
    

Formula

a(n) = n*binomial(2*n-3, n-1).
More generally, total number of k's (k>=0) in all ordered partitions of n into n parts, allowing zeros, is n*binomial(2*n-k-2, n-2) if n >= k, 0 otherwise.
Total number of 0's is given by A005430.
From Vladeta Jovovic, Sep 17 2004: (Start)
a(n) = Sum_{k=0..n} k*binomial(n, k)*binomial(n-2, k-2).
G.f.: x*(1 -2*x +(1-4*x)^(3/2))/(2*(1-4*x)^(3/2)).
E.g.f.: (x/2)*(exp(2*x)*BesselI(0, 2*x)+1). (End)
a(n) = A014107(n)*A000108(n-2). - Philippe Deléham, Apr 12 2007
a(n) = n*A088218(n-1) for n > 0. - Werner Schulte, Jan 22 2017
From Bruce J. Nicholson, Jul 11 2019: (Start)
a(n) = A002740(n) + A097613(n).
a(n) = A110609(n-1) - A002457(n-2) + A097613(n).
a(n) = A005430(n-1) - A000917(n-3) for n > 1.
a(n) = A002457(n-1) - A037965(n) - A000917(n-3) for n > 1.
a(n) = A037965(n)/2.
a(n) = A001700(n-2)*n.
a(n) = A001791(n-2)*n + A000984(n-2)*n for n > 1. (End)
From Amiram Eldar, May 16 2022: (Start)
Sum_{n>=1} 1/a(n) = 4*Pi/(3*sqrt(3)) - Pi^2/9.
Sum_{n>=1} (-1)^(n+1)/a(n) = 8*log(phi)/sqrt(5) - 4*log(phi)^2, where phi is the golden ratio (A001622). (End)
a(n) = 2^(n-2)*JacobiP(n-1, -1/2, -n+2, 3) for n > 1. - Peter Luschny, Jan 22 2025

Extensions

Formula, more terms and comments from Vladeta Jovovic, Sep 15 2004

A110608 Number triangle T(n,k) = binomial(n,k)*binomial(2n,n-k).

Original entry on oeis.org

1, 2, 1, 6, 8, 1, 20, 45, 18, 1, 70, 224, 168, 32, 1, 252, 1050, 1200, 450, 50, 1, 924, 4752, 7425, 4400, 990, 72, 1, 3432, 21021, 42042, 35035, 12740, 1911, 98, 1, 12870, 91520, 224224, 244608, 127400, 31360, 3360, 128, 1, 48620, 393822, 1145664, 1559376
Offset: 0

Views

Author

Paul Barry, Jul 30 2005

Keywords

Comments

First column is A000984. Second column is A110609 = n^2*A000108. Row sums are A005809.

Examples

			Triangle begin
n\k|   0     1     2    3   4   5
---------------------------------
0  |   1
1  |   2     1
2  |   6     8     1
3  |  20    45    18    1
4  |  70   224   168   32   1
5  | 252  1050  1200  450  50   1
...
		

Crossrefs

Cf. A000108, A000984, A005809 (row sums), A008459, A110609 (column 2), A120986.

Programs

  • Mathematica
    Flatten[Table[Table[Binomial[n,k]Binomial[2n,n-k],{k,0,n}],{n,0,10}]] (* Harvey P. Dale, Aug 10 2011 *)
  • Maxima
    B(x,y):=(sqrt(-x*(4*x^2*y^3+(-12*x^2-8*x)*y^2+(12*x^2-20*x+4)*y-4*x^2+x))/(2*3^(3/2))-(x*(18*y+9)-2)/54)^(1/3);
    C(x,y):=-B(x,y)-(x*(3*y-3)+1)/(9*B(x,y))-1/3;
    A(x,y):=x*diff(C(x,y),x)*(-1/C(x,y)+1/(1+C(x,y)));
    taylor(A(x,y),x,0,7,y,0,7); /* Vladimir Kruchinin, Sep 24 2018 */
  • PARI
    for(n=0,10, for(k=0,n, print1(binomial(n,k)*binomial(2*n,n-k), ", "))) \\ G. C. Greubel, Sep 01 2017
    

Formula

From Peter Bala, Oct 13 2015: (Start)
n-th row polynomial R(n,t) = [x^n] ( (1 + t*x)*(1 + x)^2 )^n.
Cf. A008459, whose n-th row polynomial is equal to [x^n] ( (1 + t*x)*(1 + x) )^n.
exp( Sum_{n >= 1} R(n,t)*x^n/n ) = 1 + (2 + t)*x + (5 + 6*t + t^2)*x^2 + ... is the o.g.f. for A120986. (End)

A253487 Number of lattice paths of 2*n+2 steps in the first quadrant from (0,0) to (n,n).

Original entry on oeis.org

2, 16, 90, 448, 2100, 9504, 42042, 183040, 787644, 3359200, 14226212, 59907456, 251100200, 1048380480, 4362680250, 18103127040, 74934688620, 309509877600, 1275964023180, 5251296336000, 21579247511640, 88555121603520, 362957071241700, 1485969577717248
Offset: 0

Views

Author

Robert Israel, Jan 02 2015

Keywords

Examples

			For n = 0 the a(0) = 2 paths of length 2 from (0,0) to (0,0) are (0,0)->(1,0)->(0,0) and (0,0)->(0,1)->(0,0).
		

Crossrefs

Cf. A110609.

Programs

  • Magma
    [(4*n+4)*(2*n+1)*Binomial(2*n, n)/(n+2): n in [0..25]]; // Vincenzo Librandi, Jan 09 2015
  • Maple
    seq((4*n+4)*(2*n+1)*binomial(2*n, n)/(n+2), n=0..30);
  • Mathematica
    Table[(4 n + 4) (2 n + 1) Binomial[2 n, n] / (n + 2), {n, 0, 25}] (* or *) CoefficientList[Series[1 / x^2 - (1 - 6 x + 4 x^2) / ((1 - 4 x)^(3/2) x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 09 2015 *)

Formula

a(n) = (4*n+4)*(2*n+1)*binomial(2*n, n)/(n+2).
a(n) = 2*(n+5)*(n+1)*a(n-1)/(n*(n+2)) + (8*n-4)*a(n-2)/(n+2).
G.f.: 1/x^2 - (1-6*x+4*x^2)/((1-4*x)^(3/2)*x^2).
E.g.f.: 16*x*exp(2*x)*I_0(2*x) + (2-4*x+16*x^2)*exp(2*x)*I_1(2*x)/x where I_0, I_1 are modified Bessel functions.
a(n) = 2*A110609(n+1). - Vincenzo Librandi, Jan 09 2015

A119574 a(n) = binomial(2*n,n)*(n+2)^2/(n+1).

Original entry on oeis.org

4, 9, 32, 125, 504, 2058, 8448, 34749, 143000, 588302, 2418624, 9934834, 40770352, 167152500, 684656640, 2801810205, 11455885080, 46801769190, 191055480000, 779363066790, 3177034283280, 12942655253580, 52693956656640, 214412258531250, 871975203591024
Offset: 0

Views

Author

Zerinvary Lajos, May 31 2006

Keywords

Crossrefs

Programs

  • Maple
    [seq (binomial(2*n,n)*(n+2)^2/(n+1),n=0..25)];
  • Mathematica
    Table[Binomial[2n,n] (n+2)^2/(n+1),{n,0,30}] (* Harvey P. Dale, Jun 02 2024 *)

Formula

Conjectured g.f.: (-1 + 14*x - 36*x^2 + (1 - 4*x)^(3/2))/(2*x*(1 - 4*x)^(3/2)). - Harvey P. Dale, Jun 02 2024.
The conjecture is true (see links). - Sela Fried, Oct 02 2024.
a(n) = A000108(n)*A000290(n+2). - Alois P. Heinz, Oct 02 2024
Showing 1-4 of 4 results.