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.

A215772 Number of undirected labeled graphs on n nodes with exactly 2 cycle graphs as connected components.

Original entry on oeis.org

1, 3, 7, 25, 127, 777, 5547, 45216, 414144, 4209480, 47009880, 572101920, 7535302560, 106791531840, 1620314539200, 26205248563200, 450022496716800, 8178211565798400, 156798308067609600, 3162998405887488000, 66967168288624128000, 1484773164338365440000
Offset: 2

Views

Author

Alois P. Heinz, Aug 23 2012

Keywords

Examples

			a(4) = 7:  .1.2.  .1-2.  .1.2.  o1.2.  .1.2o  .1-2.  .1.2.
.          .|.|.  .....  ..X..  ../|.  .|\..  ..\|.  .|\..
.          .3.4.  .3-4.  .3.4.  .3-4.  .3-4.  o3.4.  .3-4o
		

Crossrefs

Column k=2 of A215771.

Programs

  • Magma
    I:=[1, 3, 7, 25, 127, 777,5547]; [n le 7 select I[n] else ((2*n^3 - 21*n^2 + 65*n - 58)*Self(n-1) - (n^4 - 13*n^3 + 60*n^2 - 116*n + 80)*Self(n-2))/((n-3)*(n- 6)): n in [1..30]]; // G. C. Greubel, Aug 30 2018
  • Maple
    a:= proc(n) option remember; `if`(n<7, [0, 0, 1, 3, 7, 25, 127][n+1],
                ((2*n^3-21*n^2+65*n-58)*a(n-1)
          -(n^4-13*n^3+60*n^2-116*n+80)*a(n-2))/((n-3)*(n-6)))
        end:
    seq(a(n), n=2..30);
  • Mathematica
    Join[{1, 3, 7, 25, 127}, RecurrenceTable[{a[n] == ((2*n^3 - 21*n^2 + 65*n - 58)*a[n-1] - (n^4 - 13*n^3 + 60*n^2 - 116*n + 80)*a[n-2])/((n-3)*(n- 6)), a[7] == 777, a[8] == 5547}, a, {n, 7, 20}]] (* G. C. Greubel, Aug 30 2018 *)
  • PARI
    m=30; v=concat([1,3,7,25,127, 777, 5547], vector(m-6)); for(n=7, m, v[n] = ((2*n^3-21*n^2+65*n-58)*v[n-1]-(n^4-13*n^3+60*n^2-116*n +80)*v[n-2] )/((n-3)*(n-6))); v \\ G. C. Greubel, Aug 30 2018
    

Formula

See Maple program.
a(n) ~ (n-1)! * (log(n) + 3/2 + gamma)/4, where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Apr 27 2015