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-10 of 13 results. Next

A001372 Number of unlabeled mappings (or mapping patterns) from n points to themselves; number of unlabeled endofunctions.

Original entry on oeis.org

1, 1, 3, 7, 19, 47, 130, 343, 951, 2615, 7318, 20491, 57903, 163898, 466199, 1328993, 3799624, 10884049, 31241170, 89814958, 258604642, 745568756, 2152118306, 6218869389, 17988233052, 52078309200, 150899223268, 437571896993, 1269755237948, 3687025544605, 10712682919341, 31143566495273, 90587953109272, 263627037547365
Offset: 0

Views

Author

Keywords

Examples

			The a(3) = 7 mappings are:
1->1, 2->2, 3->3
1->1, 2->2, 3->1 (equiv. to 1->1, 2->2, 3->2, or 1->1, 2->1, 3->3, etc.)
1->1, 2->3, 3->2
1->1, 2->1, 3->2
1->1, 2->1, 3->1
1->2, 2->3, 3->1
1->2, 2->1, 3->1
		

References

  • F. Bergeron, G. Labelle, and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 41, 209.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6.6.
  • R. A. Fisher, Contributions to Mathematical Statistics, Wiley, 1950, 41.401.
  • 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).

Crossrefs

Programs

  • Maple
    with(combstruct): M[ 2671 ] := [ F,{F=Set(K), K=Cycle(T), T=Prod(Z,Set(T))},unlabeled ]:
    a:=seq(count(M[2671],size=n),n=0..27); # added by W. Edwin Clark, Nov 23 2010
  • 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}];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,1,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 *)
    max = 40; A[n_] := A[n] = If[n <= 1, n, Sum[DivisorSum[j, #*A[#]&]*A[n-j], {j, 1, n-1}]/(n-1)]; H[t_] := Sum[A[n]*t^n, {n, 0, max}]; F = 1 / Product[1 - H[x^n], {n, 1, max}] + O[x]^max; CoefficientList[F, x] (* Jean-François Alcover, Dec 01 2015, after Joerg Arndt *)
  • PARI
    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] ) );
    A000081=concat([0], A);
    H(t)=subst(Ser(A000081, 't), 't, t);
    x='x+O('x^N);
    F=1/prod(n=1,N, 1 - H(x^n));
    Vec(F)
    \\ Joerg Arndt, Jul 10 2014

Formula

Euler transform of A002861.
a(n) ~ c * d^n / sqrt(n), where d = A051491 = 2.9557652856519949747148... (Otter's rooted tree constant), c = 0.442876769782206479836... (for a closed form see "Mathematical Constants", p.308). - Vaclav Kotesovec, Mar 17 2015

Extensions

More terms etc. from Paul Zimmermann, Mar 15 1996
Name edited by Keith J. Bauer, Jan 07 2024

A048888 a(n) = Sum_{m=1..n} T(m,n+1-m), array T as in A048887.

Original entry on oeis.org

0, 1, 2, 4, 7, 13, 23, 42, 76, 139, 255, 471, 873, 1627, 3044, 5718, 10779, 20387, 38673, 73561, 140267, 268065, 513349, 984910, 1892874, 3643569, 7023561, 13557019, 26200181, 50691977, 98182665, 190353369, 369393465, 717457655
Offset: 0

Views

Author

Keywords

Comments

From Marc LeBrun, Dec 12 2001: (Start)
Define a "numbral arithmetic" by replacing addition with binary bitwise inclusive-OR (so that [3] + [5] = [7] etc.) and multiplication becomes shift-&-OR instead of shift-&-add (so that [3] * [3] = [7] etc.). [d] divides [n] means there exists an [e] with [d] * [e] = [n]. For example the six divisors of [14] are [1], [2], [3], [6], [7] and [14]. Then it appears that this sequence gives the number of proper divisors of [2^n-1]. Conjecture confirmed by Richard C. Schroeppel, Dec 14 2001. (End)
The number of "prime endofunctions" on n points, meaning the cardinality of the subset of the A001372(n) mappings (or mapping patterns) up to isomorphism from n (unlabeled) points to themselves (endofunctions) which are neither the sum of prime endofunctions (i.e., whose disjoint connected components are prime endofunctions) nor the categorical product of prime endofunctions. The n for which a(n) is prime (n such that the number of prime endofunctions on n points is itself prime) are 2, 4, 5, 6, 9, 13, 19, ... - Jonathan Vos Post, Nov 19 2006
For n>=1, compositions p(1)+p(2)+...+p(m)=n such that p(k)<=p(1)+1, see example. - Joerg Arndt, Dec 28 2012

Examples

			From _Joerg Arndt_, Dec 28 2012: (Start)
There are a(6)=23 compositions p(1)+p(2)+...+p(m)=6 such that p(k)<=p(1)+1:
[ 1]  [ 1 1 1 1 1 1 ]
[ 2]  [ 1 1 1 1 2 ]
[ 3]  [ 1 1 1 2 1 ]
[ 4]  [ 1 1 2 1 1 ]
[ 5]  [ 1 1 2 2 ]
[ 6]  [ 1 2 1 1 1 ]
[ 7]  [ 1 2 1 2 ]
[ 8]  [ 1 2 2 1 ]
[ 9]  [ 2 1 1 1 1 ]
[10]  [ 2 1 1 2 ]
[11]  [ 2 1 2 1 ]
[12]  [ 2 1 3 ]
[13]  [ 2 2 1 1 ]
[14]  [ 2 2 2 ]
[15]  [ 2 3 1 ]
[16]  [ 3 1 1 1 ]
[17]  [ 3 1 2 ]
[18]  [ 3 2 1 ]
[19]  [ 3 3 ]
[20]  [ 4 1 1 ]
[21]  [ 4 2 ]
[22]  [ 5 1 ]
[23]  [ 6 ]
(End)
		

Crossrefs

Programs

  • PARI
    N = 66;  x = 'x + O('x^N);
    gf = sum(n=0,N,  (1-x^n)*x^n/(1-2*x+x^(n+1)) ) + 'c0;
    v = Vec(gf);  v[1]-='c0;  v
    /* Joerg Arndt, Apr 14 2013 */

Formula

G.f.: Sum_{k>0} x^k*(1-x^k)/(1-2*x+x^(k+1)). - Vladeta Jovovic, Feb 25 2003
a(m) = Sum_{ n=2..m+1 } Fn(m) where Fn is a Fibonacci n-step number (Fibonacci, tetranacci, etc.) indexed as in A000045, A000073, A000078. - Gerald McGarvey, Sep 25 2004

A329228 Triangle read by rows: T(n,k) is the number of digraphs on n unlabeled vertices such that every vertex has outdegree k, n >= 1, 0 <= k < n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 6, 6, 1, 1, 13, 79, 13, 1, 1, 40, 1499, 1499, 40, 1, 1, 100, 35317, 257290, 35317, 100, 1, 1, 291, 967255, 56150820, 56150820, 967255, 291, 1, 1, 797, 29949217, 14971125930, 111359017198, 14971125930, 29949217, 797, 1
Offset: 1

Views

Author

Andrew Howroyd, Nov 08 2019

Keywords

Examples

			Triangle begins:
  1;
  1,   1;
  1,   2,      1;
  1,   6,      6,        1;
  1,  13,     79,       13,        1;
  1,  40,   1499,     1499,       40,      1;
  1, 100,  35317,   257290,    35317,    100,   1;
  1, 291, 967255, 56150820, 56150820, 967255, 291, 1;
  ...
		

Crossrefs

Columns k=0..5 are A000012, A001373, A129524, A185193, A185194, A185303.
Row sums are A329234.

Programs

  • PARI
    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}
    E(v, x) = {my(r=1/(1-x)); for(i=1, #v, r=serconvol(r, prod(j=1, #v, my(g=gcd(v[i], v[j])); (1 + x^(v[j]/g))^g)/(1 + x))); r}
    Row(n)={my(s=0); forpart(p=n, s+=permcount(p)*E(p, x+O(x^n))); Vec(s/n!)}
    { for(n=1, 8, print(Row(n))) }

A129524 Number of unlabeled digraphs on n vertices such that every vertex has outdegree 2.

Original entry on oeis.org

0, 0, 1, 6, 79, 1499, 35317, 967255, 29949217, 1033242585, 39323062014, 1637375262965, 74075329383599, 3619112881630497, 189953824713590782, 10661151595417930874, 637230479685691806302, 40415532825383300892418, 2711124591869919503655096
Offset: 1

Views

Author

Vladeta Jovovic, May 29 2007

Keywords

Crossrefs

Column k=2 of A329228.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Nov 08 2019

A185193 Number of unlabeled digraphs on n vertices such that every vertex has outdegree 3.

Original entry on oeis.org

0, 0, 0, 1, 13, 1499, 257290, 56150820, 14971125930, 4829990898461, 1864386642498918, 851204815909786099, 454661054439318678263, 281270600132956104641972, 199701092658236514672384967, 161392692052798327047616107614, 147373164027242947672475065773269
Offset: 1

Views

Author

Nathaniel Johnston, Feb 08 2012

Keywords

Crossrefs

Column k=3 of A329228.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Nov 08 2019

A185194 Number of unlabeled digraphs on n vertices such that every vertex has outdegree 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 40, 35317, 56150820, 111359017198, 278086517599356, 877760741062694898, 3482578978170418753715, 17204168691253789080138981, 104690934973509839187285618311, 776311587313178356520412354767734, 6942595716239018207126337605515965388
Offset: 1

Views

Author

Nathaniel Johnston, Feb 08 2012

Keywords

Crossrefs

Column k=4 of A329228.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Nov 08 2019

A185303 Number of unlabeled digraphs on n vertices such that every vertex has outdegree 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 100, 967255, 14971125930, 278086517599356, 6521004095675547914, 197419530111112377546537, 7747427934648623352166753715, 392370903258277676503800999871543, 25436929780226775791085690703723141426, 2090584629532654146005764252197925046719651
Offset: 1

Views

Author

Nathaniel Johnston, Feb 08 2012

Keywords

Crossrefs

Column k=5 of A329228.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Nov 08 2019

A362899 Array read by antidiagonals: T(n,k) is the number of nonisomorphic multisets of fixed-point-free endofunctions on an n-set with k endofunctions.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 9, 6, 1, 1, 0, 1, 22, 162, 13, 1, 1, 0, 1, 63, 3935, 4527, 40, 1, 1, 0, 1, 136, 81015, 1497568, 172335, 100, 1, 1, 0, 1, 302, 1369101, 384069023, 883538845, 7861940, 291, 1, 1, 0, 1, 580, 19601383, 78954264778, 3450709120355, 725601878962, 416446379, 797, 1
Offset: 0

Views

Author

Andrew Howroyd, May 10 2023

Keywords

Comments

Isomorphism is up to permutation of the elements of the n-set. Each endofunction can be considered to be a loopless digraph where each node has out-degree 1.

Examples

			Array begins:
==============================================================
n/k| 0  1      2         3             4                 5 ...
---+----------------------------------------------------------
0  | 1  1      1         1             1                 1 ...
1  | 1  0      0         0             0                 0 ...
2  | 1  1      1         1             1                 1 ...
3  | 1  2      9        22            63               136 ...
4  | 1  6    162      3935         81015           1369101 ...
5  | 1 13   4527   1497568     384069023       78954264778 ...
6  | 1 40 172335 883538845 3450709120355 10786100835304758 ...
  ...
		

Crossrefs

Columns k=0..3 are A000012, A001373, A362900, A362901.
Main diagonal is A362902.

Programs

  • PARI
    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)) - 1)^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!)}

A036360 a(n) = Sum_{k=1..n} n! * n^(n-k+1) / (n-k)!.

Original entry on oeis.org

0, 1, 12, 153, 2272, 39225, 776736, 17398969, 435538944, 12058401393, 366021568000, 12090393761721, 431832459644928, 16585599200808937, 681703972229640192, 29858718555221585625, 1388451967046195347456, 68316647610168842824161, 3546179063131198669848576, 193670918442059606406896473
Offset: 0

Views

Author

Keywords

Comments

This formula is given as a solution to Exercise 1.15a in the Harary and Palmer reference on page 30. However, the formula may not be correct and could be a misprint for Sum_{k=2..n} n! * n^(n-k-1) / (n-k)! which is a formula for A000435(n). - Andrew Howroyd, Feb 06 2024
It appears that a(n) * n^-(n+1) is the mean position of the first duplicate in sequences of n elements randomly drawn with replacement. - Brian P Hawkins, Jan 06 2024
Total count over all mappings from [n] to [n] of tail length plus cycle size of all nodes, where mappings are sets of cycles of trees and tail length is the distance to the cycle that eventually traps the iterates of a node of the mapping; cycle size is the size of that cycle. Alternatively, number of elements on the trajectory of iterates of a node until a repeat is seen, summed over all nodes and mappings. - Marko Riedel, Jul 20 2024

Examples

			Example: Consider the map [1,2,3,4] -> [2,3,4,4]. The trajectory of node one is [1,2,3,4]. Hence the tail length is three and the cycle size is one, a fixed point.
		

References

  • F. Harary and E. Palmer, Graphical Enumeration, (1973), p. 30, Exercise 1.15a.
  • P. Flajolet and A. Odlyzko, Random Mapping Statistics, INRIA RR 1114.

Crossrefs

Programs

  • Maple
    a := proc(n) local k; add(n!*n^(n-k+1)/(n-k)!, k=0..n); end;
    # Alternative, e.g.f.:
    T := -LambertW(-x): egf := (T + T^2)/(1 - T)^4: ser := series(egf, x, 22):
    seq(n!*coeff(ser, x, n), n = 0..19);  # Peter Luschny, Jul 20 2024
  • Mathematica
    Table[Sum[n!*n^(n-k+1)/(n-k)!, {k, 1, n}], {n, 0, 19}] (* James C. McMahon, Feb 07 2024 *)
    a[n_] := n E^n Gamma[n + 1, n] - n^(n + 1);
    Table[a[n], {n, 0, 19}]  (* Peter Luschny, Jul 20 2024 *)
  • PARI
    a(n) = sum(k=1, n, n! * n^(n-k+1) / (n-k)!) \\ Andrew Howroyd, Jan 06 2024
  • Python
    def a(n):
        total_sum = 0
        for k in range(1, n + 1):
            term = (math.factorial(n) / math.factorial(n - k))*(k**2)*(n**(n - k))
            total_sum += term
        return total_sum
    # Brian P Hawkins, Jan 06 2024
    

Formula

a(n) = n^2 * A001865(n). - Gerald McGarvey, Apr 17 2008
a(n) = Sum_{k=1..n} n! * k^2 * n^(n-k) / (n-k)!. - Brian P Hawkins, Jan 06 2024
a(n) = n! * [z^n] (T+T^2)/(1-T)^4 where T is Cayley's tree function T(z) = Sum_{n >= 1} n^(n-1) * z^n/n!. - Marko Riedel, Jul 20 2024
a(n) ~ n^n * ((1/2) * n * sqrt(2 * Pi * n) - (1/3) * n) - Marko Riedel, Jul 20 2024
a(n) = n * e^n * Gamma(n + 1, n) - n^(n + 1) = 2*A262970(n) - A007778(n). - Peter Luschny, Jul 20 2024

Extensions

Offset corrected by Brian P Hawkins, Jan 06 2024
Name edited by Andrew Howroyd, Feb 06 2024
Offset set to 0 and a(0) = 0 prepended by Marko Riedel, Jul 20 2024

A217897 Triangular array read by rows. T(n,k) is the number of unlabeled functions on n nodes that have exactly k fixed points, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 3, 1, 1, 6, 7, 4, 1, 1, 13, 19, 9, 4, 1, 1, 40, 47, 27, 10, 4, 1, 1, 100, 130, 68, 29, 10, 4, 1, 1, 291, 343, 195, 76, 30, 10, 4, 1, 1, 797, 951, 523, 220, 78, 30, 10, 4, 1, 1, 2273, 2615, 1477, 600, 228, 79, 30, 10, 4, 1, 1, 6389, 7318, 4096, 1708, 625, 230, 79, 30, 10, 4, 1, 1
Offset: 0

Views

Author

Geoffrey Critzer, Oct 14 2012

Keywords

Comments

Row sums are A001372;
Column for k=0 is A001373;
Column for k=1 is A001372. (offset)

Examples

			Triangle begins:
     1;
     0,    1;
     1,    1,    1;
     2,    3,    1,   1;
     6,    7,    4,   1,   1;
    13,   19,    9,   4,   1,  1;
    40,   47,   27,  10,   4,  1,  1;
   100,  130,   68,  29,  10,  4,  1,  1;
   291,  343,  195,  76,  30, 10,  4,  1, 1;
   797,  951,  523, 220,  78, 30, 10,  4, 1, 1;
  2273, 2615, 1477, 600, 228, 79, 30, 10, 4, 1, 1;
		

Programs

  • 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}];cfd=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)^cfd[[i]]/(1-y x^i)^rt[[i]],{i,1,nn-1}],{x,0,10}],{x,y}]//Grid (* after code given by Robert A. Russell in A000081 *)

Formula

O.g.f.: Product_{n>=1} 1/((1-x^n)^A002862(n) * (1 - y*x^n)^A000081(n) ).
Showing 1-10 of 13 results. Next