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.

A171074 A115112 with initial term changed from 0 to 1.

Original entry on oeis.org

1, 4, 18, 68, 250, 922, 3430, 12868, 48618, 184754, 705430, 2704154, 10400598, 40116598, 155117518, 601080388, 2333606218, 9075135298, 35345263798, 137846528818, 538257874438, 2104098963718, 8233430727598, 32247603683098
Offset: 1

Views

Author

N. J. A. Sloane, Sep 06 2010

Keywords

Comments

From a variant of the tennis ball problem (cf. A031970, A049235). On turn n ball 2n-1 is introduced to the room, ball 2n is introduced to the garden, then one of the balls in the room is swapped with one of the balls in the garden. The present sequence gives the number of combinations, while A171075 gives the total on the lawn, A170076 gives the total in the room.

References

  • David Scambler, Just for fun, more tennis balls, Posting to the Sequence Fans Mailing List, Aug 25 2010.

Crossrefs

A030662 Number of combinations of n things from 1 to n at a time, with repeats allowed.

Original entry on oeis.org

1, 5, 19, 69, 251, 923, 3431, 12869, 48619, 184755, 705431, 2704155, 10400599, 40116599, 155117519, 601080389, 2333606219, 9075135299, 35345263799, 137846528819, 538257874439, 2104098963719, 8233430727599, 32247603683099, 126410606437751, 495918532948103
Offset: 1

Views

Author

Donald Mintz (djmintz(AT)home.com)

Keywords

Comments

Add terms of an increasingly bigger diamond-shaped part of Pascal's triangle:
.......................... 1
............ 1 .......... 1 1
.. 1 ...... 1 1 ........ 1 2 1
. 1 1 =5 . 1 2 1 =19 .. 1 3 3 1 =69
.. 2 ...... 3 3 ........ 4 6 4
............ 6 ......... 10 10
.......................... 20
- Ralf Stephan, May 17 2004
The prime p divides a((p-1)/2) for p in A002144 (Pythagorean primes). - Alexander Adamchuk, Jul 04 2006
Also, number of square submatrices of a square matrix. - Jono Henshaw (jjono(AT)hotmail.com), Apr 22 2008
Partial sums of A051924. - J. M. Bergot, Jun 22 2013
Number of partitions with Ferrers diagrams that fit in an n X n box (excluding the empty partition of 0). - Michael Somos, Jun 02 2014
Also number of non-descending sequences with length and last number are less or equal to n, and also the number of integer partitions (of any positive integer) with length and largest part are less or equal to n. - Zlatko Damijanic, Dec 06 2024

Examples

			G.f. = x + 5*x^2 + 19*x^3 + 69*x^4 + 251*x^5 + 923*x^6 + 3431*x^7 + ...
		

Crossrefs

Column k=2 of A047909.
Central column of triangle A014473.
Right-hand column 2 of triangle A102541.

Programs

  • Magma
    [(n+1)*Catalan(n)-1: n in [1..40]]; // G. C. Greubel, Apr 07 2024
  • Maple
    seq(sum((binomial(n,m))^2,m=1..n),n=1..23); # Zerinvary Lajos, Jun 19 2008
    f:=n->add( add( binomial(i+j,i), i=0..n),j=0..n); [seq(f(n),n=0..12)]; # N. J. A. Sloane, Jan 31 2009
  • Mathematica
    Table[Sum[Sum[(2n-i-j)!/(n-i)!/(n-j)!,{i,1,n}],{j,1,n}],{n,1,20}] (* Alexander Adamchuk, Jul 04 2006 *)
    a[n_] := 2*(2*n-1)!/(n*(n-1)!^2)-1; Table[a[n], {n, 1, 26}] (* Jean-François Alcover, Oct 11 2012, from first formula *)
  • PARI
    a(n)=binomial(2*n,n)-1 \\ Charles R Greathouse IV, Jun 26 2013
    
  • Python
    from math import comb
    def a(n): return comb(2*n, n) - 1
    print([a(n) for n in range(1, 27)]) # Michael S. Branicky, Jul 11 2023
    
  • Sage
    def a(n) : return binomial(2*n,n) - 1
    [a(n) for n in (1..26)] # Peter Luschny, Apr 21 2012
    

Formula

a(n) = A000984(n) - 1.
a(n) = 2*A001700(n-1) - 1.
a(n) = 2*(2*n-1)!/(n!*(n-1)!)-1.
a(n) = Sum_{k=1..n} binomial(n, k)^2. - Benoit Cloitre, Aug 20 2002
a(n) = Sum_{j=0..n} Sum_{i=j..n+j} binomial(i, j). - Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jul 23 2003
a(n) = Sum_{i=0..n-1} Sum_{j=0..n-1} binomial(i+j, i). - N. J. A. Sloane, Jan 31 2009
Also for n>1: a(n)=(2*n)!/(n!)^2-1. - Hugo Pfoertner, Feb 10 2004
a(n) = Sum_{j=1..n} Sum_{i=1..n} (2n-i-j)!/((n-i)!*(n-j)!). - Alexander Adamchuk, Jul 04 2006
a(n) = A115112(n) + 1. - Jono Henshaw (jjono(AT)hotmail.com), Apr 22 2008
G.f.: Q(0)*(1-4*x)/x - 1/x/(1-x), where Q(k)= 1 + 4*(2*k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
D-finite with recurrence: n*a(n) +2*(-3*n+2)*a(n-1) +(9*n-14)*a(n-2) +2*(-2*n+5)*a(n-3)=0. - R. J. Mathar, Jun 25 2013
0 = a(n)*(+16*a(n+1) - 70*a(n+2) + 68*a(n+3) - 14*a(n+4)) + a(n+1)*(-2*a(n+1) + 61*a(n+2) - 96*a(n+3) + 23*a(n+4)) + a(n+2)*(-6*a(n+2) + 31*a(n+3) - 10*a(n+4)) + a(n+3)*(-2*a(n+3) + a(n+4)) for all n in Z. - Michael Somos, Jun 02 2014
From Ilya Gutkovskiy, Jan 25 2017: (Start)
O.g.f.: (1 - x - sqrt(1 - 4*x))/((1 - x)*sqrt(1 - 4*x)).
E.g.f.: exp(x)*(exp(x)*BesselI(0,2*x) - 1). (End)
a(n) = 3*n*Sum_{k=1..n} (-1)^(k+1)/(2*n+k)*binomial(2*n+k,n-k). - Vladimir Kruchinin, Jul 29 2025
a(n) = n * binomial(2*n, n) * Sum_{k = 1..n} 1/(k*binomial(n+k, k)). - Peter Bala, Aug 05 2025

A132823 A007318 + 2*A103451 - 2*A000012.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 3, 8, 8, 3, 1, 1, 4, 13, 18, 13, 4, 1, 1, 5, 19, 33, 33, 19, 5, 1, 1, 6, 26, 54, 68, 54, 26, 6, 1, 1, 7, 34, 82, 124, 124, 82, 34, 7, 1, 1, 8, 43, 118, 208, 250, 208, 118, 43, 8, 1, 1, 9, 53, 163, 328, 460, 460, 328, 163, 53, 9, 1
Offset: 0

Views

Author

Gary W. Adamson, Sep 02 2007

Keywords

Comments

Row sums = A132824: (1, 2, 2, 4, 10, 24, 54, 116, 242, ...).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 0,  1;
  1, 1,  1,  1;
  1, 2,  4,  2,   1;
  1, 3,  8,  8,   3,   1;
  1, 4, 13, 18,  13,   4,  1;
  1, 5, 19, 33,  33,  19,  5,  1;
  1, 6, 26, 54,  68,  54, 26,  6, 1;
  1, 7, 34, 82, 124, 124, 82, 34, 7, 1;
  ...
		

Crossrefs

A(2n,n) gives A115112 for n>0.

Formula

A007318 + 2*A103451 - 2*A000012 as infinite lower triangular matrices.

Extensions

One missing 1 inserted and more terms added by Alois P. Heinz, Feb 10 2019

A323848 Irregular triangle read by rows: T(n,d) (n >= 1, d <= n-1 for n>1) = number of n X n integer-valued matrices M such that M_{1,1}=0, M_{n,n}=d, M_{(i+1),j} = M_{i,j} + (0 or 1), M_{i,(j+1)} = M_{i,j} + (0 or 1), and M_{(i+1),(j+1)} = M_{i,j} + (0 or 1).

Original entry on oeis.org

0, 4, 18, 25, 68, 386, 256, 250, 4657, 12200, 4356, 922, 54219, 432842, 608993, 123904, 3430, 642815, 14697256, 60650883, 49489706, 5909761, 12868, 7852836, 514608568, 5713126349, 13458882036, 6648891794, 473497600, 48618, 98755951, 18971384148, 558848240787, 3406380649146, 4857082197177, 1489334202216, 63799687396
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2019

Keywords

Comments

T(n,n-1) = A005157(n-1)^2 for n >= 2. See Knuth (2019) link.

Examples

			Triangle begins:
  n\d    1      2        3        4        5       6  7
   1     0      0        0        0        0       0  0
   2     4      0        0        0        0       0  0
   3    18     25        0        0        0       0  0
   4    68    386      256        0        0       0  0
   5   250   4657    12200     4356        0       0  0
   6   922  54219   432842   608993   123904       0  0
   7  3430 642815 14697256 60650883 49489706 5909761  0
...
		

References

  • D. E. Knuth, Email to N. J. A. Sloane, Feb 06 2019.

Crossrefs

Columns d=1-2 give: A115112, A306322.

Formula

T(n,1) = binomial(2n,n) - 2.

Extensions

More terms from Alois P. Heinz, Feb 07 2019

A323849 Irregular triangle read by rows: T(n,d) (n >= 1, 0 <= d <= 2n-2) = number of n X n integer-valued matrices M such that M_{1,1}=0, M_{n,n}=d, and M_{(i+1),j} = M_{i,j} + (0 or 1), M_{i,(j+1)} = M_{i,j} + (0 or 1).

Original entry on oeis.org

1, 1, 4, 1, 1, 18, 44, 18, 1, 1, 68, 615, 1236, 615, 68, 1, 1, 250, 7313, 46812, 84910, 46812, 7313, 250, 1, 1, 922, 85801, 1592348, 8241540, 14024408, 8241540, 1592348, 85801, 922, 1, 1, 3430, 1030330, 54926890, 759337545, 3397542544, 5530983756, 3397542544, 759337545, 54926890, 1030330, 3430, 1
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2019

Keywords

Examples

			Triangle begins:
  n\d 0   1     2       3       4        5       6       7     8   9 10
  1   1
  2   1   4     1
  3   1  18    44      18       1
  4   1  68   615    1236     615       68       1
  5   1 250  7313   46812   84910    46812    7313     250     1
  6   1 922 85801 1592348 8241540 14024408 8241540 1592348 85801 922  1
  ...
		

References

  • D. E. Knuth, Email to N. J. A. Sloane, Feb 06 2019.

Crossrefs

Columns k=0-2 give: A000012, A115112, A252869.
T(n,n-1) gives A306372.
Cf. A323848.

Formula

T(n,1) = binomial(2n,n) - 2 = A115112(n).
The triangle is symmetric: T(n,d) = T(n,2n-2-d).

Extensions

Edited by Alois P. Heinz, Feb 11 2019

A115791 Number of different ways to select n elements from five sets of n elements under the precondition of choosing at least one element from each set.

Original entry on oeis.org

0, 0, 0, 0, 3125, 97200, 1932805, 31539200, 461828790, 6332578125, 83235183075, 1063505908080, 13327125965725, 164758298214965, 2017489363833125, 24538128923443200, 297028957324770140, 3583456866615114630
Offset: 1

Views

Author

Hieronymus Fischer, Jan 31 2006

Keywords

Comments

The number of different ways to select n elements from five sets of n elements under the precondition of choosing at least one element from each set.

Examples

			a(6)=binomial(30,6)-5*binomial(24,6)+10*binomial(18,6)-10*binomial(12,6)+5=97200;
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[5n,n]-5Binomial[4n,n]+10Binomial[3n,n]-10Binomial[2n,n]+5,{n,20}] (* Harvey P. Dale, Nov 06 2011 *)

Formula

a(n) = binomial(5*n,n)-5*binomial(4*n,n)+10*binomial(3*n,n)-10*binomial(2*n,n)+5; ; also: a(n)=sum{binomial(n,i)*binomial(n,j)*binomial(n,k)*binomial(n,l)*binomial(n,m)||i,j,k,l,m=1...(n-4),i+j+k+l+m=n}. General formula for N sets with m elements each: the number of different ways to select k elements from j different sets: G(N,m,j,k) = binomial(N,j)*sum(binomial(j,i)*binomial(i*m,k)*(-1)^i*(-1)^j|i=1...j); Recursion formula: G(N,m,j,k) = binomial(N,j)*binomial(j*m,k) - sum(binomial(N-i,j-i)*G(N,m,i,k)|i=1...j-1);
Showing 1-6 of 6 results.