login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000368 Number of connected graphs with one cycle of length 4.
(Formerly M3365 N1356)
4
1, 1, 4, 9, 28, 71, 202, 542, 1507, 4114, 11381, 31349, 86845, 240567, 668553, 1860361, 5188767, 14495502, 40572216, 113743293, 319405695, 898288484, 2530058013, 7135848125, 20152898513, 56986883801 (list; graph; refs; listen; history; text; internal format)
OFFSET

4,3

REFERENCES

J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.

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).

F. Harary and E. Palmer, Graphical Enumeration, Academic Press, 1973, page 69.

LINKS

Sean A. Irvine and Washington Bomfim, Table of n, a(n) for n = 4..200 (terms n=4..43 computed by Sean A. Irvine)

Frank Ruskey, Combinatorial Generation Algorithm 4.26, p. 96

FORMULA

a(n) = Sum_(P){ g(p,a) }, where P is the set of the partitions p of n with four parts, each p as a vector of nP distinct parts: p[1], p[2], ..., p[nP], with frequencies respectively a[1],a[2], ..., a[nP], a[1] = max(a[i], i = 1..nP). C(,) is a binomial coefficient, f = A000081, and g(p,a) is given below.

        | 2*f(p[1]) + 3*C(f(p[1]),2)) * f(p[2]) * f(p[3])     if nP = 3,

        | 3 * f(p[1]) * f(p[2]) * f(p[3]) * f(p[4])           if nP = 4,

        | 3 * C(f(p[1]),2) * C(f(p[2]),2) + 2 * f(p[2]) * C(f(p[1]),2) +

g(p,a)= < 2 * (f(p[1]) * (C(f(p[2]),2) + f(p[2]))) if nP=2, and a[1]= 2,

        | f(p[2])*( f(p[1]) + 3*C(f(p[1]),3) + 2*f(p[1]) * (f(p[1])-1) )

        |                                       if nP = 2, and a[1] = 3,

        | f(p[1])*(2*f(p[1])-1+2*C(f(p[1])-1,2))+3*C(f(p[1]),4) if nP=1.

# Washington Bomfim, Jul 19 2012

MATHEMATICA

Needs["Combinatorica`"]; nn = 30; s[n_, k_] := s[n, k] = a[n + 1 - k] + If[n < 2 k, 0, s[n - k, k]]; a[1] = 1; a[n_] := a[n] = Sum[a[i] s[n - 1, i] i, {i, 1, n - 1}]/(n - 1); rt = Table[a[i], {i, 1, nn}]; Take[CoefficientList[CycleIndex[DihedralGroup[4], s] /. Table[s[j] -> Table[Sum[rt[[i]] x^(k*i), {i, 1, nn}], {k, 1, nn}][[j]], {j, 1, nn}], x], {5, nn}] (* after code given by Robert A Russel in A000081, Geoffrey Critzer, Oct 12 2012 *)

PROG

(PARI)

max_n = 200; f = vector(max_n);         \\ f[n] = A000081[n], n=1..max_n

sum2(k) = {local(s); s=0; fordiv(k, d, s += d*f[d]); return(s)};

Init_f()={f[1]=1;

for(n =1, max_n -2, s=0; for(k=1, n, s+=sum2(k)*f[n-k+1]); f[n+1]=s/n)};

S; P=[0, 1, 1, 1, 1, 0]; nP; a=[0, 0, 0, 0, 0]; p=[0, 0, 0, 0, 0];

C(x, y) = binomial(x, y);

g()={if(nP==3, S+=(2*f[p[1]] + 3*C(f[p[1]], 2))*f[p[2]]*f[p[3]]; return());

if(nP == 4, S += 3 * f[p[1]] * f[p[2]] * f[p[3]] * f[p[4]]; return());

if((nP==2)&&(a[1]==2),

S += 3*C(f[p[1]], 2)*C(f[p[2]], 2) +

2*f[p[2]]*C(f[p[1]], 2) + 2*(f[p[1]]*(C(f[p[2]], 2)+f[p[2]])); return());

if((nP==2)&&(a[1]==3),

S += f[p[2]] * (f[p[1]] + 3*C(f[p[1]], 3) + 2*f[p[1]]*(f[p[1]]-1)); return());

S += f[p[1]] * ( 2*f[p[1]] - 1 + 2*C(f[p[1]]-1, 2) ) + 3*C(f[p[1]], 4);

}

Convert()={i=3; k=2; x=P[2]; nP=0;  \\ Convert partition P to (nP, p, a)

while(1, while(P[i] == x, i++); nP++; p[nP] = P[k]; a[nP] = i-k;

   if(a[nP] > a[1], b=a[1]; a[1]=a[nP]; a[nP]=b; b=p[1]; p[1]=p[nP]; p[nP]=b);

   if(P[i] == 0, g(); return()); x = P[i]; k = i; i++)

}

                                        \\ F. Ruskey partition generator

Part(n, k, s, t) = { P[t] = s;

if((k == 1) || (n == k), Convert(), L = max(1, ceil((n - s)/(k - 1)));

for(j = L, min(s, n-s-k+2), Part(n-s, k-1, j, t+1))); P[t] = 1; };

\\

A(n) = {S=0; Part(2*n, 4+1, n, 1); return(S)}

Init_f(); for(n=4, max_n, print(n, " ", A(n)))          \\ b-file format

\\ # Washington Bomfim, Jul 19 2012

CROSSREFS

Cf. A000226, A001429, A005703, A000081.

Sequence in context: A244968 A071258 A120333 * A232765 A094255 A192234

Adjacent sequences:  A000365 A000366 A000367 * A000369 A000370 A000371

KEYWORD

nonn

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from Vladeta Jovovic, Apr 20 2000

Definition improved by Franklin T. Adams-Watters, May 16 2006

More terms from Sean A. Irvine, Nov 14 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 23 02:46 EDT 2017. Contains 286909 sequences.