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

A001205 Number of clouds with n points; number of undirected 2-regular labeled graphs; or number of n X n symmetric matrices with (0,1) entries, trace 0 and all row sums 2.

Original entry on oeis.org

1, 0, 0, 1, 3, 12, 70, 465, 3507, 30016, 286884, 3026655, 34944085, 438263364, 5933502822, 86248951243, 1339751921865, 22148051088480, 388246725873208, 7193423109763089, 140462355821628771, 2883013994348484940
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of ways of covering K_n with cycles of length >= 3. Also number of 'frames' on n lines: given n lines in general position (none parallel and no three concurrent), a frame is a subset of n of the e C(n,2) points of intersection such that no three points are on the same line. - Mitch Harris, Jul 06 2006

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 410-411.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 276 and 279.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6.7.
  • Ph. Flajolet, Singular combinatorics, pp. 561-571, Proc. Internat. Congr. Math., Beijing 2002, Higher Education Press, Beijing, 2002, Vol III.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, ex. 3.3.6b, 3.3.34.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.8. Also problems 5.23 and 5.15(a), case k=3.
  • Z. Tan and S. Gao, Enumeration of (0,1)-Symmetric Matrices, submitted [From Shanzhen Gao, Jun 05 2009] [apparently unpublished as of 2016]
  • H. S. Wilf, Generatingfunctionology, Academic Press, NY, 1990, p. 77, Eq. 3.9.1.
  • W. A. Whitworth, Choice and Chance, Bell, 1901, p. 269, ex. 160.

Crossrefs

Cf. A000985, A000986, A002137. A diagonal of A059441 and A144163.

Programs

  • Maple
    a := n -> (-1)^n*n!*add((3/4)^k*binomial(-1/2, n-k)*hypergeom([1/2,-k], [1/2-n+k], 1/3)/ k!, k=0..n): seq(simplify(a(n)), n=0..21); # Peter Luschny, Aug 26 2017
  • Mathematica
    m = 21; CoefficientList[ Series[ Exp[-x/2 - x^2/4] / Sqrt[1-x], {x, 0, m}], x]*Table[n!, {n, 0, m}] (* Jean-François Alcover, Jun 21 2011, after e.g.f. *)
  • Maxima
    a(n):=sum(sum(binomial(k,i)*binomial(i-1/2,n-k)*(3^(k-i)*n!)/(4^k*k!)*(-1)^(n-i),i,0,k),k,0,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Aug 25 2017 */
  • PARI
    a(n)=if(n<0,0,n!*polcoeff(exp(-x/2-x^2/4+x*O(x^n))/sqrt(1-x+x*O(x^n)),n))
    

Formula

a(n) ~ n!*exp(-3/4)/sqrt(Pi*n).
E.g.f.: exp(-x/2-x^2/4)/sqrt(1-x).
D-finite with recurrence a(n+1) = n*(a(n)+a(n-2)*(n-1)/2).
1/4^n * Sum_{b=0..floor(n/2)} Sum_{g=0..n-2*b} (-1)^(b+g) * 2^(2b+g) * n! * (2n-4b-2g)! / (b! * g! * (n-2b-g)!^2). - Shanzhen Gao, Jun 05 2009
a(n) = (-1)^n*n!*Sum_{k=0..n}(3/4)^k*binomial(-1/2, n - k)*hypergeom([1/2, -k], [1/2 - n + k], 1/3)/ k!. - Peter Luschny, Aug 26 2017

A188403 T(n,k) = Number of (n*k) X k binary arrays with rows in nonincreasing order, n ones in every column and no more than 2 ones in any row.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 10, 11, 4, 1, 26, 56, 23, 5, 1, 76, 348, 214, 42, 6, 1, 232, 2578, 2698, 641, 69, 7, 1, 764, 22054, 44288, 14751, 1620, 106, 8, 1, 2620, 213798, 902962, 478711, 62781, 3616, 154, 9, 1, 9496, 2313638, 22262244, 20758650, 3710272, 222190, 7340, 215, 10, 1
Offset: 1

Views

Author

R. H. Hardin, Mar 30 2011

Keywords

Comments

From Andrew Howroyd, Apr 09 2020: (Start)
T(n,k) is the number of k X k symmetric matrices with nonnegative integer entries and all row and column sums n. The number of such matrices up to isomorphism is given in A333737.
T(n,k) is also the number of loopless multigraphs with k labeled nodes of degree n or less. The number of such multigraphs up to isomorphism is given in A333893. (End)

Examples

			Table starts
  1  2   4    10      26        76         232          764          2620
  1  3  11    56     348      2578       22054       213798       2313638
  1  4  23   214    2698     44288      902962     22262244     648446612
  1  5  42   641   14751    478711    20758650   1158207312   80758709676
  1  6  69  1620   62781   3710272   313568636  36218801244 5518184697792
  1  7 106  3616  222190  22393101  3444274966 767013376954 ...
  1  8 154  7340  681460 111200600 29445929253 ...
  1  9 215 13825 1865715 472211360 ...
  1 10 290 24510 4655535 ...
  1 11 381 41336 ...
  ...
All solutions for 4 X 2:
..1..0....1..1....1..1
..1..0....1..1....1..0
..0..1....0..0....0..1
..0..1....0..0....0..0
		

Crossrefs

Columns 1..8 are A000012, A000027(n+1), A019298(n+1), A053493, A053494, A188400, A188401, A188402.
Main diagonal is A333739.

Programs

  • PARI
    T(k,n)={
      local(M=Map(Mat([0, 1])));
      my(acc(p, v)=my(z); mapput(M, p, if(mapisdefined(M, p, &z), z+v, v)));
      my(recurse(r, h, p, q, v, e) = if(!p, acc(x^e+q, v), my(i=poldegree(p), t=pollead(p)); self()(r, k, p-t*x^i, q+t*x^i, v, e); for(m=1, h-i, for(j=1, min(t, (k-e)\m), self()(r, if(j==t, k, i+m-1), p-j*x^i, q+j*x^(i+m), binomial(t, j)*v, e+j*m)))));
      for(r=1, n, my(src=Mat(M)); M=Map(); for(i=1, matsize(src)[1], recurse(n-r, k, src[i, 1], 0, src[i, 2], 0))); vecsum(Mat(M)[,2]);
    }
    {for(n=1, 7, for(k=1, 7, print1(T(n,k),", ")); print)} \\ Andrew Howroyd, Apr 08 2020

A000986 Number of n X n symmetric matrices with (0,1) entries and all row sums 2.

Original entry on oeis.org

1, 0, 1, 4, 18, 112, 820, 6912, 66178, 708256, 8372754, 108306280, 1521077404, 23041655136, 374385141832, 6493515450688, 119724090206940, 2337913445039488, 48195668439235612, 1045828865817825264, 23826258064972682776, 568556266922455167040
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of simple labeled graphs on n nodes with all vertices of degree 1 or 2.
From R. J. Mathar, Apr 07 2017: (Start)
These are the row sums of the following triangle which shows the number of symmetric n X n {0,1} matrices with row and column sums 2 refined for trace t, 0 <= t <= n:
0: 1
1: 0 0
2: 0 0 1
3: 1 0 3 0
4: 3 0 12 0 3
5: 12 0 70 0 30 0
6: 70 0 465 0 270 0 15
7: 465 0 3507 0 2625 0 315 0
See also A001205 for column t=0. (End)

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.8.
  • Herbert S. Wilf, Generatingfunctionology, p. 104.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
           `if`(n<2, 1-n, add(binomial (n-1, k-1)
            *(k! +`if`(k>2, (k-1)!, 0))/2 *a(n-k), k=2..n))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 24 2011
  • Mathematica
    a=1/(2(1-x))-1/2-x/2; b=(Log[1/(1-x)]-x-x^2/2)/2;
    Range[0, 20]! CoefficientList[Series[Exp[a + b], {x, 0, 20}], x]
    (* Second program: *)
    a[n_] := a[n] = If[n<2, 1-n, Sum[Binomial[n-1, k-1]*(k! + If[k>2, (k-1)!, 0])/2*a[n-k], {k, 2, n}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 20 2017, after Alois P. Heinz *)

Formula

E.g.f.: (1-x)^(-1/2)*exp(-x-x^2/4 + x/((2*(1-x)))).
Sum_{a_1=0..n} Sum_{c=0..min(a_1, n - a_1)} Sum_{b=0..floor((n - a_1 - c)/2)} ((-1)^((n - a_1 - 2b - c) + b)*n!*(2a_1)!) / (2^(n + a_1 - 2c)*a_1!*(n - a_1 - 2b - c)!*b!*(2c)!*(a_1 - c)!). - Shanzhen Gao, Jun 05 2009
Conjecture: 2*a(n) +2*(-2*n+1)*a(n-1) +2*(n^2-2*n-1)*a(n-2) -2*(n-2)*(n-4)*a(n-3) +(n-1)*(n-2)*(n-3)*a(n-4) -(n-2)*(n-3)*(n-4)*a(n-5)=0. - R. J. Mathar, Aug 04 2013
Recurrence: 2*a(n) = 4*(n-1)*a(n-1) - 2*(n-3)*(n-1)*a(n-2) - (n-3)*(n-2)*(n-1)*a(n-4). - Vaclav Kotesovec, Feb 13 2014
a(n) ~ n^n * exp(sqrt(2*n)-n-3/2) / sqrt(2) * (1 + 43/(24*sqrt(2*n))). - Vaclav Kotesovec, Feb 13 2014

A002137 Number of n X n symmetric matrices with nonnegative integer entries, trace 0 and all row sums 2.

Original entry on oeis.org

1, 0, 1, 1, 6, 22, 130, 822, 6202, 52552, 499194, 5238370, 60222844, 752587764, 10157945044, 147267180508, 2282355168060, 37655004171808, 658906772228668, 12188911634495388, 237669544014377896, 4871976826254018760, 104742902332392298296
Offset: 0

Views

Author

Keywords

Comments

The definition implies that the matrices are symmetric, have entries 0, 1 or 2, have 0's on the diagonal, and the entries in each row or column sum to 2.
From Victor S. Miller, Apr 26 2013: (Start)
A002137 also is the number of monomials in the determinant of a generic n X n symmetric matrix with 0's on the diagonal (see the paper of Aitken).
It is also the number of monomials in the determinant of the Cayley-Menger matrix. Even though this matrix is symmetric with 0's on the diagonal, it has 1's in the first row and column and so requires an extra argument. (End) [See the MathOverflow link for details of these bijections. - N. J. A. Sloane, Apr 27 2013]
From Bruce Westbury, Jan 22 2013: (Start)
It follows from the respective exponential generating functions that A002135 is the binomial transform of A002137:
A002135(n) = Sum_{k=0..n} C(n,k) * A002137(k),
2 = 1*1 + 2*0 + 1*1,
5 = 1*1 + 3*0 + 3*1 + 1*1,
17 = 1*1 + 4*0 + 6*1 + 4*1 + 1*6, ...
A002137 arises from looking at the dimension of the space of invariant tensors of the r-th tensor power of the adjoint representation of the symplectic group Sp(2n) (for n large compared to r). (End)
Also the number of subgraphs of a labeled K_n made up of cycles and isolated edges (but no isolated vertices). - Kellen Myers, Oct 17 2014

Examples

			a(2)=1 from
  02
  20
a(3)=1 from
  011
  101
  011
s(4)=6 from
  0200 0110
  2000 1001
  0002 1001
  0020 0110
  x3   x3
		

References

  • N. J. Calkin, J. E. Janoski, matrices of row and column sum 2, Congr. Numerantium 192 (2008) 19-32
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.8.

Crossrefs

Column k=2 of A333351.
A diagonal of A260340.

Programs

  • Mathematica
    nxt[{n_,a_,b_,c_}]:={n+1,b,c,n(b+c)-n(n-1) a/2}; Drop[Transpose[ NestList[ nxt,{0,1,0,1},30]][[2]],2] (* Harvey P. Dale, Jun 12 2013 *)
  • PARI
    x='x+O('x^66); Vec( serlaplace( (1-x)^(-1/2)*exp(-x/2+x^2/4) ) ) \\ Joerg Arndt, Apr 27 2013

Formula

E.g.f.: (1-x)^(-1/2)*exp(-x/2+x^2/4).
a(n) = (n-1)*(a(n-1)+a(n-2)) - (n-1)*(n-2)*a(n-3)/2.
a(n) ~ sqrt(2) * n^n / exp(n+1/4). - Vaclav Kotesovec, Feb 25 2014

A095693 Triangle read by rows: T(n,k) is the number of multigraphs without loops on n labeled nodes with k edges and maximum degree 2.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 3, 6, 1, 1, 6, 21, 22, 6, 1, 10, 55, 130, 130, 22, 1, 15, 120, 485, 1005, 822, 130, 1, 21, 231, 1400, 4830, 8547, 6202, 822, 1, 28, 406, 3416, 17465, 52052, 81676, 52552, 6202, 1, 36, 666, 7392, 52101, 230832, 610932, 859932, 499194, 52552
Offset: 0

Views

Author

Nicholas S. Horne (nickhorne(AT)cox.net), Jul 06 2004

Keywords

Comments

Sum of the each row of the triangle corresponds to sequence A000985. The diagonal of the triangular array T(n,1) represents the triangular numbers (A000217). The T(n,2) diagonal represents the doubly triangular numbers (A002817).
Number of symmetric n X n matrices with nonnegative integer entries and all row sums 2 and trace 2*(n-k). - Andrew Howroyd, Nov 07 2019

Examples

			Triangle begins:
  1;
  1,  0;
  1,  1,   1;
  1,  3,   6,    1;
  1,  6,  21,   22,    6;
  1, 10,  55,  130,  130,   22;
  1, 15, 120,  485, 1005,  822,  130;
  1, 21, 231, 1400, 4830, 8547, 6202, 822;
  ...
T(3,2)=6 since there are six ways that a multigraph with 3 nodes can be constructed with 2 edges such that no vertex has degree greater than two.
		

References

  • Horne, Nicholas S. "Analysis of Viable Network Configurations from a Combinatorial, Graphical and Algebraic Perspective." Diss. Providence College, 2004.

Crossrefs

Row sums are A000985.
Main diagonal is A002137.
Columns include A000217, A002817.

Programs

  • PARI
    T(n)={my(v=Vec(serlaplace(sqrt(1/(1-x*y) + O(x*x^n))*exp(x + (x^2*y/(1-x*y) - x*y)/2 + x^2*y^2/4 + O(x*x^n))))); vector(#v, i, Vecrev(v[i], i))}
    { my(A=T(10)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Nov 07 2019

Formula

E.g.f.: sqrt(1/(1-x*y)) * exp(x + (x^2*y/(1-x*y) - x*y)/2 + x^2*y^2/4). - Andrew Howroyd, Nov 07 2019

Extensions

Definition clarified and terms a(37) and beyond from Andrew Howroyd, Nov 07 2019

A108246 Number of labeled 2-regular graphs with no multiple edges, but loops are allowed (i.e., each vertex is endpoint of two (usual) edges or one loop).

Original entry on oeis.org

1, 1, 1, 2, 8, 38, 208, 1348, 10126, 86174, 819134, 8604404, 98981944, 1237575268, 16710431992, 242337783032, 3756693451772, 61991635990652, 1084943597643964, 20072853005524696, 391443701509660096, 8024999955144721256, 172544980412641191776
Offset: 0

Views

Author

Marni Mishna, Jun 17 2005

Keywords

Examples

			a(3) = 2: {(1,2) (2,3) (1,3)}, {(1,1) (2,2) (3,3)}.
		

Crossrefs

Binomial transform of A001205.
Row sums of A144161. - Alois P. Heinz, Jun 01 2009

Programs

  • Maple
    b:= proc(n) option remember; if n=0 then 1 elif n<3 then 0 else (n-1) *(b(n-1) +b(n-3) *(n-2)/2) fi end: a:= proc(n) add(b(k) *binomial(n,k), k=0..n) end: seq(a(n), n=0..30);  # Alois P. Heinz, Sep 12 2008
  • Mathematica
    CoefficientList[Series[E^(-x^2/4+x/2)/Sqrt[1-x], {x, 0, 20}], x]* Table[n!, {n, 0, 20}] (* Vaclav Kotesovec, Oct 17 2012 *)

Formula

Linear recurrence satisfied by a(n): {a(2) = 1, a(0) = 1, (-n^2 - 3*n - 2)*a(n) + (4 + 2*n)*a(n+1) + (-2*n-6)*a(n+2) + 2*a(n+3), a(1) = 1}.
E.g.f.: exp(-t^2/4 + t/2)/sqrt(1-t). - Vladeta Jovovic, Aug 14 2006
a(n) ~ sqrt(2)*n^n/exp(n-1/4). - Vaclav Kotesovec, Oct 17 2012

Extensions

More terms from Alois P. Heinz, Sep 12 2008

A227786 Take squares larger than 1, subtract 3 from even squares and 2 from odd squares; a(n) = a(n-1) + A168276(n+1) (with a(1) = 1).

Original entry on oeis.org

1, 7, 13, 23, 33, 47, 61, 79, 97, 119, 141, 167, 193, 223, 253, 287, 321, 359, 397, 439, 481, 527, 573, 623, 673, 727, 781, 839, 897, 959, 1021, 1087, 1153, 1223, 1293, 1367, 1441, 1519, 1597, 1679, 1761, 1847, 1933, 2023, 2113, 2207, 2301, 2399, 2497, 2599, 2701
Offset: 1

Views

Author

Antti Karttunen, Jul 31 2013

Keywords

Comments

Conjecture: from n>=2 onward, a(n) gives the positions of 2's in A227761.
a(29) = 897 = 3*13*23 is the first term which is neither prime nor semiprime, that is, has more than two prime divisors.

Crossrefs

Bisections: A082109, A073577. Cf. also A227761.

Formula

a(n) = A000290(n+1) - 2 - (n mod 2).
a(1)=1, and for n>1, a(n) = a(n-1)+A168276(n+1).
a(n) = (1/2) * (2*n^2 + 4*n -3 + (-1)^n) = 2*A116940(n-1) + 1. a(n-1) = 2*ceiling(n^2/2) - 3 = 2*A000985(n) - 3. G.f.: x*(-x^3 - x^2 + 5*x + 1)/((1-x)^3 * (1+x)). - Ralf Stephan, Aug 10 2013

A000987 Number of stochastic matrices of integers.

Original entry on oeis.org

0, 1, 1, 2, 7, 32, 184, 1268, 10186, 93356, 960646, 10959452, 137221954, 1870087808, 27548231008, 436081302248, 7380628161076, 132975267434552, 2540593483517404, 51299775805464824, 1091447620966600804, 24401984084483685248, 571907754141520643296
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Mathematica
    (* b = A000985 *) Clear[a, b]; b[0] = 1; b[1] = 1; b[2] = 3; b[3] = 11; b[4] = 56; b[n_] := b[n] = (2*n-1)*b[n-1] - (n-2)*(n-1)*b[n-2] - (n-2)*(n - 1)*b[n-3] + (n-3)*(n-2)*(n-1)*b[(n-4)]/2; a[0] = 0; a[1] = 1; a[n_] := a[n] = (n-2)*a[n-1] + b[n-2]; Array[a, 22, 0] (* Jean-François Alcover, Feb 15 2016, after Sean A. Irvine *)

Formula

a(0) = 0, a(1) = 1, a(n) = (n-2) * a(n-1) + A000985(n - 2), n >= 2. - Sean A. Irvine, Sep 24 2015

Extensions

More terms from Sean A. Irvine, Sep 24 2015
Showing 1-8 of 8 results.