A001373
Number of functional digraphs (digraphs of functions on n nodes where every node has outdegree 1 and loops of length 1 are forbidden).
Original entry on oeis.org
1, 0, 1, 2, 6, 13, 40, 100, 291, 797, 2273, 6389, 18264, 51916, 148666, 425529, 1221900, 3511507, 10111043, 29142941, 84112009, 243000149, 702758065, 2034150215, 5892907566, 17084615940, 49567063847, 143902155133, 418032946298, 1215076634226, 3533715961160, 10282042126394, 29931877173282, 87173224346464, 253989569994664
Offset: 0
- F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 70, Table 3.4.1.
- 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).
- Joerg Arndt, Table of n, a(n) for n = 0..508
- Frank Harary, The number of functional digraphs, Mathematische Annalen, 138.3 (1959): 203-210. - From _N. J. A. Sloane_, Apr 08 2014
- Ronald C. Read, Note on number of functional digraphs, Math. Ann., vol. 143 (1961), pp. 109-111.
- N. J. A. Sloane, Transforms
- L. Travis, Graphical Enumeration: A Species-Theoretic Approach, arXiv:math/9811127 [math.CO], 1998.
- James Turner and William H. Kautz, A survey of progress in graph theory in the Soviet Union, SIAM Rev. 12 1970 suppl. iv+68 pp. MR0268074 (42 #2973). See p. 20 concerning calculation of a(n) for n <= 25 by Zakrevskii in 1961. - _N. J. A. Sloane_, Apr 08 2014
-
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}];c=Drop[Apply[Plus,Table[Take[CoefficientList[CycleIndex[CyclicGroup[n],s]/.Table[s[j]->Table[Sum[rt[[i]] x^(k*i),{i,1,nn}],{k,1,nn}][[j]],{j,1,nn}],x],nn],{n,2,30}]],1];CoefficientList[Series[Product[1/(1-x^i)^c[[i]],{i,1,nn-1}],{x,0,nn}],x] (* after code given by Robert A. Russell in A000081 *) (* Geoffrey Critzer, Oct 12 2012 *)
-
N=66; A=vector(N+1, j, 1);
for (n=1, N, A[n+1] = 1/n * sum(k=1,n, sumdiv(k,d, d*A[d]) * A[n-k+1] ) );
v0000081=concat([0], A); \\ A000081
x='x+O('x^N); T = Ser(v0000081);
gf = x/T / prod(n=1,N, 1 - subst(T,'x,'x^n) );
v001373 = Vec(gf) \\ Joerg Arndt, Apr 17 2014
A054745
Number of nonisomorphic binary n-state automata without output under input permutations.
Original entry on oeis.org
1, 1, 7, 74, 1474, 41876, 1540696, 68343112, 3540691525, 209612916303, 13957423192794, 1032436318269648, 83993175608894096, 7453446303042245261, 716451740543945788671, 74159075140708644544128, 8223831291824019614386868, 972718473204236819072891710
Offset: 0
- F. Harary and E. Palmer, Graphical Enumeration, 1973.
-
with(numtheory):
b:= proc(n, i) option remember; `if`(n=0, {0}, `if`(i<1, {},
{seq(map(p-> p+j*x^i, b(n-i*j, i-1) )[], j=0..n/i)}))
end:
a:= proc(n) option remember; add(add(mul(mul(add(coeff(s, x, d)
*d, d=divisors(ilcm(i, j)))^(igcd(i, j)*coeff(s, x, i)*
coeff(t, x, j)), j=1..degree(t)), i=1..degree(s))
/mul(i^coeff(t, x, i)*coeff(t, x, i)!, i=1..degree(t))
/mul(i^coeff(s, x, i)*coeff(s, x, i)!, i=1..degree(s))
, t=b(2$2)), s=b(n$2))
end:
seq(a(n), n=0..20); # Alois P. Heinz, Aug 15 2014
-
b[n_, i_] := b[n, i] = If[n==0, {0}, If[i<1, {}, Table[Map[Function[{p}, p + j*x^i], b[n - i*j, i-1]], {j, 0, n/i}] // Flatten // Union]];
a[n_] := a[n] = Sum[Sum[Product[Product[With[{g = GCD[i, j]*Coefficient[s, x, i]*Coefficient[t, x, j]}, If[g==0, 1, Sum[Coefficient[s, x, d]*d, {d, Divisors[LCM[i, j]]}]^g]], {j, 1, Exponent[t, x]}], {i, 1, Exponent[s, x]}]/
Product[i^Coefficient[t, x, i]Coefficient[t, x, i]!, {i, Exponent[t, x]}]/
Product[i^Coefficient[s, x, i]Coefficient[s, x, i]!, {i, Exponent[s, x]}], {t, b[2, 2]}], {s, b[n, n]}];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 16 2015, after Alois P. Heinz, updated Jan 01 2021 *)
A054050
Number of nonisomorphic binary n-state automata.
Original entry on oeis.org
1, 10, 129, 2836, 83061, 3076386, 136647824, 7081061404, 419223006090, 27914819962058, 2064872379041701, 167986348586006675, 14906892578198245332, 1432903480780688968334, 148318150277923875087238, 16447662583606982784243526, 1945436946407977282783367806, 244476687257496605058725664611
Offset: 1
From _Petros Hadjicostas_, Mar 08 2021: (Start)
For n = 2, we have the partitions 1*2 + 2*0 and 1*0 + 2*1 of 2 (in frequency notation). The corresponding denominators in _Christian G. Bower_'s formula are 1^2*2!*2^0*0! = 2 and 1^0*0!*2^1*1! = 2.
Also, fixA[s_1 = 2, s_2 = 0] = (Sum_{d|1} d*s_d)^(2*s_1) * (Sum_{d|2} d*s_d)^(2*s_2) = (1*s_1)^(2*s_1) = 16. In addition, fixA[s_1 = 0, s_2 = 1] = (Sum_{d|1} d*s_d)^(2*s_1) * (Sum_{d|2} d*s_d)^(2*s_2) = (1*s_1 + 2*s_2)^(2*s_2) = (0 + 2)^2 = 4. Hence a(2) = 16/2 + 4/2 = 10. (End)
- F. Harary and E. Palmer, Graphical Enumeration, 1973.
- M. A. Harrison, A census of finite automata, Canad. J. Math., 17, No. 1, (1965), 100-113. [See p. 107 (Theorem 6.1 with k = 2 and p = 1) and p. 110 (Table I).]
-
A054050(n)={local(p=vector(n));
my(S=0, A() = prod(i=1, n, sumdiv(i, d, d*p[d])^(2*p[i])),
inc()=!forstep(i=n, 1, -1, p[i]n, p[i]=n); next(2))); t==n && S+ = A()/prod(i=1, n, i^p[i]*p[i]!)); S} \\ This is a modification of M. F. Hasler's PARI program from A002854. - Petros Hadjicostas, Mar 08 2021
A126285
Number of partial mappings (or mapping patterns) from n points to themselves; number of partial endofunctions.
Original entry on oeis.org
1, 2, 6, 16, 45, 121, 338, 929, 2598, 7261, 20453, 57738, 163799, 465778, 1328697, 3798473, 10883314, 31237935, 89812975, 258595806, 745563123, 2152093734, 6218854285, 17988163439, 52078267380, 150899028305, 437571778542, 1269754686051, 3687025215421
Offset: 0
- Alois P. Heinz, Table of n, a(n) for n = 0..750
- R. I. McLachlan, K. Modin, H. Munthe-Kaas, and O. Verdier, What are Butcher series, really? The story of rooted trees and numerical methods for evolution equations, arXiv preprint arXiv:1512.00906 [math.NA], 2015-2017.
- N. J. A. Sloane, Transforms
-
nmax = 28;
a81[n_] := a81[n] = If[n<2, n, Sum[Sum[d*a81[d], {d, Divisors[j]}]*a81[n-j ], {j, 1, n-1}]/(n-1)];
A[n_] := A[n] = If[n<2, n, Sum[DivisorSum[j, #*A[#]&]*A[n-j], {j, 1, n-1} ]/(n-1)];
H[t_] := Sum[A[n]*t^n, {n, 0, nmax+2}];
F = 1/Product[1 - H[x^n], {n, 1, nmax+2}] + O[x]^(nmax+2);
A1372 = CoefficientList[F, x];
a[n_] := Sum[a81[k] * A1372[[n-k+2]], {k, 0, n+1}];
Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Aug 18 2018, after Franklin T. Adams-Watters *)
-
Pol. = InfinitePolynomialRing(QQ)
@cached_function
def Z(n):
if n==0: return Pol.one()
return sum(t[k]*Z(n-k) for k in (1..n))/n
def pmagmas(n,k=1): # number of partial k-magmas on a set of n elements up to isomorphism
P = Z(n)
q = 0
coeffs = P.coefficients()
count = 0
for m in P.monomials():
p = 1
V = m.variables()
T = cartesian_product(k*[V])
for t in T:
r = [Pol.varname_key(str(u))[1] for u in t]
j = [m.degree(u) for u in t]
D = 1
lcm_r = lcm(r)
for d in divisors(lcm_r):
try: D += d*m.degrees()[-d-1]
except: break
p *= D^(prod(r)/lcm_r*prod(j))
q += coeffs[count]*p
count += 1
return q
# Philip Turecek, Nov 27 2023
A116950
Number of functional patterns on n elements; or digraphs with maximum outdegree 1, n arrows and every point connected to an arrow.
Original entry on oeis.org
1, 2, 7, 20, 61, 174, 514, 1478, 4303, 12437, 36084, 104494, 303167, 879283, 2552803, 7413583, 21544347, 62635823, 182199853, 530228946, 1543761513, 4496523995, 13102414665, 38193626823, 111375529695, 324891970936, 948051861938, 2767336312386, 8080206646244
Offset: 0
For n=2 there are the following 7 digraphs:
o-+.o-+ o->o-+ o->o o-+.o->o o->o->o o->o o->o
^.|.^.| ...^.| ^..| ^.|..... ....... ...^ ....
+-+.+-+ ...+-+ +--+ +-+..... ....... o--+ o->o
-
nmax = 750;
A002861 = Cases[Import["https://oeis.org/A002861/b002861.txt", "Table"], {, }][[;; nmax + 2, 2]];
A000081 = Cases[Import["https://oeis.org/A000081/b000081.txt", "Table"], {, }][[;; nmax + 2, 2]];
etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b];
b[n_] := A002861[[n]] + A000081[[n + 2]];
a = etr[b];
a[0] = 1;
a /@ Range[0, nmax](* Jean-François Alcover, Mar 13 2020 *)
A125024
Minimal Goedel number of endofunctions on k points, by row and sorted within rows (number of points).
Original entry on oeis.org
1, 2, 6, 12, 18, 30, 60, 90, 150, 540, 1500, 2250, 210, 420, 630, 1050, 1890, 2520, 3150, 3780, 7560, 9450, 15750, 18900, 28350, 75600, 113400, 126000, 141750, 216000, 246960, 5402250, 2310, 4620, 6930, 11550
Offset: 0
For example, take the endofunction on 4 points which is composed of two 2-cycles. We can write this as: (1, 2, 3, 4) -> (2, 1, 4, 3) which has the Goedel number 2^2 * 3^1 * 5^4 * 7^3 = 2572500. We can also renumber the points (applying the symmetric group S_n: n^n -> n^n) and write it: (1, 2, 3, 4) -> (3, 4, 1, 2) which gives us the Goedel number 2^3 * 3*4 * 5^1 * 7^2 = 158760. But the minimal Goedel number for that endofunction comes from:
(1, 2, 3, 4) -> (4, 3, 2, 1) which gives us 756000. Hence I can enumerate all the minimal Goedel numbers for the 7 endofunctions on 4 points as: 30, 60, 90, 150, 540, 1500, 2250.
Table begins:
n | row(n) of Goedel numbers
0 | 1. (formally defining prime(0) = 1)
1 | 2.
2 | 6, 12, 18.
3 | 30, 60, 90, 150, 540, 1500, 2250.
4 | 210, 420, 630, 1050, 1890, 2520, 3150, 3780, 7560, 9450, 15750, 18900, 28350, 75600, 113400, 126000, 141750, 216000, 246960, 5402250.
5 | 2310, 4620, 6930, 11550, ...
6 | 30030, 60060, 90090, 150150, ...
7 | 510510, 1021020, 1531530, ...
8 | 9699690, 19399380.
Cf.
A001372,
A002110,
A074736 Goedel encoding of the prime factors of n, in increasing order and repeated according to multiplicity,
A076954 Product_{i=1..n} prime(i)^i,
A125023 Number of mappings (or mapping patterns) from k =< n points to themselves; number of endofunctions on k <= n points.
A259471
Triangle read by rows: T(n,k) is the number of semi-regular relations on n nodes with each node having out-degree k (0 <= k <= n).
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 19, 66, 19, 1, 1, 47, 916, 916, 47, 1, 1, 130, 16816, 91212, 16816, 130, 1, 1, 343, 373630, 12888450, 12888450, 373630, 343, 1, 1, 951, 9727010, 2411213698, 14334255100, 2411213698, 9727010, 951, 1, 1, 2615, 289374391, 575737451509, 22080097881081, 22080097881081, 575737451509, 289374391, 2615, 1
Offset: 0
Triangle begins:
1;
1, 1;
1, 3, 1;
1, 7, 7, 1;
1, 19, 66, 19, 1;
1, 47, 916, 916, 47, 1;
1, 130, 16816, 91212, 16816, 130, 1;
...
-
permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
edges[v_, k_] := Product[SeriesCoefficient[Product[g = GCD[v[[i]], v[[j]] ]; (1 + x^(v[[j]]/g) + O[x]^(k + 1))^g, {j, 1, Length[v]}], {x, 0, k}], {i, 1, Length[v]}];
T[n_, k_] := Module[{s = 0}, Do[s += permcount[p]*edges[p, k], {p, IntegerPartitions[n]}]; s/n!];
Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 08 2021, after Andrew Howroyd *)
-
permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
edges(v,k)={prod(i=1, #v, polcoef(prod(j=1, #v, my(g=gcd(v[i],v[j])); (1 + x^(v[j]/g) + O(x*x^k))^g), k))}
T(n,k)={my(s=0); forpart(p=n, s+=permcount(p)*edges(p,k)); s/n!} \\ Andrew Howroyd, Sep 13 2020
A362897
Array read by antidiagonals: T(n,k) is the number of nonisomorphic multisets of endofunctions on an n-set with k endofunctions.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 7, 1, 1, 1, 13, 74, 19, 1, 1, 1, 22, 638, 1474, 47, 1, 1, 1, 34, 4663, 118949, 41876, 130, 1, 1, 1, 50, 28529, 7643021, 42483668, 1540696, 343, 1, 1, 1, 70, 151600, 396979499, 33179970333, 23524514635, 68343112, 951, 1
Offset: 0
Array begins:
======================================================================
n/k| 0 1 2 3 4 5 ...
---+------------------------------------------------------------------
0 | 1 1 1 1 1 1 ...
1 | 1 1 1 1 1 1 ...
2 | 1 3 7 13 22 34 ...
3 | 1 7 74 638 4663 28529 ...
4 | 1 19 1474 118949 7643021 396979499 ...
5 | 1 47 41876 42483668 33179970333 20762461502595 ...
6 | 1 130 1540696 23524514635 274252613077267 2559276179593762172 ...
...
-
permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
K(v,m) = {prod(i=1, #v, my(g=gcd(v[i],m), e=v[i]/g); sum(j=1, #v, my(t=v[j]); if(e%(t/gcd(t,m))==0, t))^g)}
T(n,k) = {if(n==0, 1, my(s=0); forpart(q=n, s+=permcount(q) * polcoef(exp(sum(m=1, k, K(q,m)*x^m/m, O(x*x^k))), k)); s/n!)}
A254529
a(n) = n! * (number of mapping patterns on n).
Original entry on oeis.org
1, 1, 6, 42, 456, 5640, 93600, 1728720, 38344320, 948931200, 26555558400, 817935148800, 27735629644800, 1020596255078400, 40642432179148800, 1737890081351424000, 79498734605402112000, 3871319396080840704000, 200017645344178421760000, 10925549584125028909056000
Offset: 0
A362898
Number of nonisomorphic unordered triples of endofunctions on an n-set.
Original entry on oeis.org
1, 1, 13, 638, 118949, 42483668, 23524514635, 18477841853059, 19526400231564564, 26714255854638149145, 45938634690184528585855, 96990967579564469350287613, 246664446832722382952639028437, 743740463651636548809953508690270, 2623456914417867939801667337352637825
Offset: 0
Comments