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 15 results. Next

A061860 Variant of A061417.

Original entry on oeis.org

1, 2, 4, 11, 28, 152, 726, 5268, 40438, 365944, 3628810, 39974466, 479001612, 6228256404, 87178339984, 1307706805928, 20922789888016, 355688409760972, 6402373705728018, 121645133931170028, 2432902008232456692
Offset: 0

Views

Author

Antti Karttunen, May 11 2001

Keywords

Comments

Does this count some variety of necklaces?

Crossrefs

A061860[p] = A061417[p] = (p-1)!+(p-1) for all prime p's.

Programs

  • Maple
    [seq(A061860(j),j=1..40)]; with(numtheory); A061860 := proc(n) local d,s; s := 0; for d in divisors(n) do s := s + phi(n/d)*(binomial(n,d))*(d!); od; RETURN(s/n); end;
  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[n/#] Binomial[n, #] (#!)&]/n; Array[a, 25] (* Jean-François Alcover, Mar 06 2016 *)

Formula

a(n) = (1/n)*Sum_{d|n} phi(n/d)*C(n, d)*(d!).

A002995 Number of unlabeled planar trees (also called plane trees) with n nodes.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 14, 34, 95, 280, 854, 2694, 8714, 28640, 95640, 323396, 1105335, 3813798, 13269146, 46509358, 164107650, 582538732, 2079165208, 7457847082, 26873059986, 97239032056, 353218528324, 1287658723550, 4709785569184
Offset: 0

Views

Author

Keywords

Comments

Noncrossing handshakes of 2(n-1) people (each using only one hand) on round table, up to rotations - Antti Karttunen, Sep 03 2000
Equivalently, the number of noncrossing partitions up to rotation composed of n-1 blocks of size 2. - Andrew Howroyd, May 04 2018
a(n), n>2, is also the number of oriented cacti on n-1 unlabeled nodes with all cutpoints of separation degree 2, i.e. ones shared only by two (cyclic) blocks. These are digraphs (without loops) that have a unique Eulerian tour. Such digraphs with labeled nodes are enumerated by A102693. - Valery A. Liskovets, Oct 19 2005
Labeled plane trees are counted by A006963. - David Callan, Aug 19 2014
This sequence is similar to A000055 but those trees are not embedded in a plane. - Michael Somos, Aug 19 2014

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 14*x^7 + 34*x^8 + 95*x^9 + ...
a(7) = 14 = 11 + 3 because there are 11 trees with 7 nodes but three of them can be embedded in a plane in two ways. These three trees have degree sequences 4221111, 3321111, 3222111, where there are two trees with each degree sequence but in the first, the two nodes of degree two are adjacent, in the second, the two nodes of degree three are adjacent, and in the third, the node of degree three is adjacent to two nodes of degree two. - _Michael Somos_, Aug 19 2014
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 304.
  • A. Errera, De quelques problèmes d'analysis situs, Comptes Rend. Congr. Nat. Sci. Bruxelles, (1930), 106-110.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 67, (3.3.26).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with (powseries): with (combstruct): n := 27: Order := n+2: sys := {C = Cycle(B), B = Union(Z,Prod(B,B))}: G003239 := (convert(gfseries(sys,unlabeled,x) [C(x)], polynom)) / x: G000108 := convert(taylor((1-sqrt(1-4*x)) / (2*x),x),polynom): G002995 := 1 + G003239 + (eval(G000108,x=x^2) - G000108^2)/2: A002995 := 1,1,1,seq(coeff(G002995,x^i),i=1..n); # Ulrich Schimke, Apr 05 2002
    with(combinat): with(numtheory): m := 2: for p from 2 to 28 do s1 := 0: s2 := 0: for d from 1 to p do if p mod d = 0 then s1 := s1+phi(p/d)*binomial(m*d, d) fi: od: for d from 1 to p-1 do if gcd(m, p-1) mod d = 0 then s2 := s2+phi(d)*binomial((p*m)/d, (p-1)/d) fi: od: printf(`%d, `, (s1+s2)/(m*p)-binomial(m*p, p)/(p*(m-1)+1)) od : # Zerinvary Lajos, Dec 01 2006
  • Mathematica
    a[0] = a[1] = 1; a[n_] := (1/(2*(n-1)))*Sum[ EulerPhi[(n-1)/d]*Binomial[2*d, d], {d, Divisors[n-1]}] - CatalanNumber[n-1]/2 + If[ EvenQ[n], CatalanNumber[n/2-1]/2, 0]; Table[ a[n], {n, 0, 29}] (* Jean-François Alcover, Mar 07 2012, from formula *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n<2, 1, n--; sumdiv(n, d, eulerphi(n/d)*binomial(2*d, d))/(2*n) - catalan(n)/2 + if ((n-1) % 2, 0, catalan((n-1)/2)/2)); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: 1+B(x)+(C(x^2)-C(x)^2)/2 where B is g.f. of A003239 and C is g.f. of A000108(n-1).
a(n) = 1/(2*(n-1))*sum{d|(n-1)}(phi((n-1)/d)*binomial(2d, d)) - A000108(n-1)/2 + (if n is even) A000108(n/2-1)/2.

Extensions

More terms, formula from Christian G. Bower, Dec 15 1999
Name corrected ("labeled" --> "unlabeled") by David Callan, Aug 19 2014

A192332 For n >= 3, draw a regular n-sided polygon and its n(n-3)/2 diagonals, so there are n(n-1)/2 lines; a(n) is the number of ways to choose a subset of these lines (subsets differing by a rotation are regarded as identical). a(1)=1, a(2)=2 by convention.

Original entry on oeis.org

1, 2, 4, 22, 208, 5560, 299600, 33562696, 7635498336, 3518440564544, 3275345183542208, 6148914696963883712, 23248573454127484129024, 176848577040808821410837120, 2704321280486889389864215362560, 83076749736557243209409446411255936, 5124252113632955685095523500148980125696, 634332307869315502692705867068871886072665600
Offset: 1

Views

Author

N. J. A. Sloane, Jun 28 2011

Keywords

Comments

Suggested by A192314.
Also the number of graphical necklaces with n vertices. We define a graphical necklace to be a simple graph that is minimal among all n rotations of the vertices. Alternatively, it is an equivalence class of simple graphs under rotation of the vertices. These are a kind of partially labeled graphs. - Gus Wiseman, Mar 04 2019

Examples

			From _Gus Wiseman_, Mar 04 2019: (Start)
Inequivalent representatives of the a(1) = 1 through a(4) = 22 graphical necklace edge-sets:
  {}  {}      {}              {}
      {{12}}  {{12}}          {{12}}
              {{12}{13}}      {{13}}
              {{12}{13}{23}}  {{12}{13}}
                              {{12}{14}}
                              {{12}{24}}
                              {{12}{34}}
                              {{13}{24}}
                              {{12}{13}{14}}
                              {{12}{13}{23}}
                              {{12}{13}{24}}
                              {{12}{13}{34}}
                              {{12}{14}{23}}
                              {{12}{24}{34}}
                              {{12}{13}{14}{23}}
                              {{12}{13}{14}{24}}
                              {{12}{13}{14}{34}}
                              {{12}{13}{24}{34}}
                              {{12}{14}{23}{34}}
                              {{12}{13}{14}{23}{24}}
                              {{12}{13}{14}{23}{34}}
                              {{12}{13}{14}{23}{24}{34}}
(End)
		

Crossrefs

Cf. A192314, A191563 (orbits under dihedral group).
Cf. A000031, A000939 (cycle necklaces), A008965, A059966, A060223, A061417, A086675 (digraph version), A184271, A275527, A323858, A324461, A324463, A324464.

Programs

  • Maple
    with(numtheory);
    f:=proc(n) local t0, t1, d; t0:=0; t1:=divisors(n);
    for d in t1 do
    if d mod 2 = 0 then t0:=t0+phi(d)*2^(n^2/(2*d))
    else t0:=t0+phi(d)*2^(n*(n-1)/(2*d)); fi; od; t0/n; end;
    [seq(f(n), n=1..30)];
  • Mathematica
    Table[ 1/n* Plus @@ Map[Function[d, EulerPhi[d]*2^((n*(n - Mod[d, 2])/2)/d)], Divisors[n]], {n, 1, 20}]  (* Olivier Gérard, Aug 27 2011 *)
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],#=={}||#==First[Sort[Table[Nest[rotgra[#,n]&,#,j],{j,n}]]]&]],{n,0,5}] (* Gus Wiseman, Mar 04 2019 *)
  • PARI
    a(n) = sumdiv(n, d, if (d%2, eulerphi(d)*2^(n*(n-1)/(2*d)), eulerphi(d)*2^(n^2/(2*d))))/n; \\ Michel Marcus, Mar 08 2019

Formula

a(n) = (1/n)*(Sum_{d|n, d odd} phi(d)*2^(n*(n-1)/(2*d)) + Sum_{d|n, d even} phi(d)*2^(n^2/(2*d))).

A006841 Permutation arrays of period n.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 28, 127, 686, 4975, 42529, 420948, 4622509, 55670332, 726738971, 10217376792, 153848448652, 2470073249960, 42120966152815, 760282326662191, 14481561464994821, 290289454462745374, 6108699653117045614
Offset: 1

Views

Author

Keywords

Comments

Also superpositions of cycles of order n of the groups S_2 and D_n. - Sean A. Irvine, Oct 25 2017

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 171.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. P. Street and R. Day, Sequential binary arrays II: Further results on the square grid, pp. 392-418 of Combinatorial Mathematics IX. Proc. Ninth Australian Conference (Brisbane, August 1981). Ed. E. J. Billington, S. Oates-Williams and A. P. Street. Lecture Notes Math., 952. Springer-Verlag, 1982.

Crossrefs

Cf. A061417.

Formula

Asymptotic behavior: The n-th term T(n) is always larger than n! / (8*n^2) = (n-1)! / 8n; for large n, it is approximated by that value. Stated as formula: T(n) > (n-1)! / 8n; lim 8n * T(n) / (n-1) = 1 as n tends to infinity.

Extensions

Terms for n=1..8 from A. P. Street and R. Day; other terms computed by Matthias Engelhardt. For n=9..12, he used a program which shifts, rotates and mirrors permutations. Terms for n=13..29 computed with a Java program implementing the formulas.

A060495 Each permutation in the list A060117 converted to Site Swap notation, with "zero throws" (fixed elements) replaced with n, the length of siteswap.

Original entry on oeis.org

1, 11, 312, 111, 231, 222, 4413, 1313, 4112, 1111, 2411, 2312, 4242, 1241, 4233, 1223, 2222, 2231, 3441, 3342, 3131, 3122, 3423, 3333, 55514, 14514, 51414, 11314, 25314, 24414, 55113, 14113, 51112, 11111, 25111, 24112, 52512, 12511, 52413
Offset: 0

Views

Author

Antti Karttunen, Mar 21 2001

Keywords

Comments

This sequence is not well-defined for n >= 3628800 because the Site Swap notation can contain values exceeding 9, for example, the Site Swap notation for a(3628800) is [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10]. - Sean A. Irvine, Nov 25 2022

Crossrefs

Cf. factorial base representation A007623 and A060496, A006694.
See also A060498, A060499, A061417. Average of digits gives number of balls: A060501.

Programs

  • Maple
    Perm2SiteSwap1 := proc(p) local ip,n,i,a; n := nops(p); ip := convert(invperm(convert(p,'disjcyc')),'permlist',n); a := []; for i from 1 to n do a := [op(a),((ip[i]-i) mod n)]; od; RETURN(a); end;
    SiteSwap1ToDec := proc(s) local i,z,n; n := nops(s); z := 0; for i from 1 to n do z := 10*z; if(0 = s[i]) then z := z+n; else z := z+s[i]; fi; od; RETURN(z); end;

Formula

a(n) = SiteSwap1ToDec(Perm2SiteSwap1(PermUnrank3R(n))).

A064640 Positions of non-crossing fixed-point-free involutions (encoded by A014486) in A055089, sorted to ascending order.

Original entry on oeis.org

0, 1, 7, 23, 127, 143, 415, 659, 719, 5167, 5183, 5455, 5699, 5759, 16687, 16703, 26815, 28495, 36899, 36959, 38579, 40031, 40319, 368047, 368063, 368335, 368579, 368639, 379567, 379583, 389695, 391375, 399779, 399839, 401459, 402911, 403199
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2001

Keywords

Comments

These permutations belong to the interpretation (kk) of the exercise 19 in the sixth chapter "Exercises on Catalan and Related Numbers" of Enumerative Combinatorics, Vol. 2, 1999 by R. P. Stanley, Wadsworth, Vol. 1, 1986: Fixed-point-free involutions w of [2n] such that if i < j < k < l and w(i) = k, then w(j) <> l.
From this, it follows that when they are subjected to the same automorphism as used in A061417 and A064636, one gets A002995.

Examples

			The first eight such permutations (after the identity) are in positions 1, 7, 23, 127, 143, 415, 659, 719 of A055089: 21, 2143, 4321, 214365, 432165, 216543, 632541, 654321 which written as disjoint cycles are (1 2), (1 2)(3 4), (1 4)(2 3), (1 2)(3 4)(5 6), (1 4)(2 3)(5 6), (1 2)(3 6)(4 5), (1 6)(2 3)(4 5), (1 6)(2 5)(3 4).
		

Crossrefs

For the needed Maple procedures see A064638. Cf. also A064639, A060112.

Programs

A086675 Number of n X n (0,1)-matrices modulo cyclic permutations of the rows.

Original entry on oeis.org

1, 2, 10, 176, 16456, 6710912, 11453291200, 80421421917440, 2305843009750581376, 268650182136584290872320, 126765060022823052739661424640, 241677817415439249618874010960064512, 1858395433210885261795036719974526548094976
Offset: 0

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 27 2003

Keywords

Comments

Also the number of digraphical necklaces with n vertices. A digraphical necklace is defined to be a directed graph that is minimal among all n rotations of the vertices. Alternatively, it is an equivalence class of directed graphs under rotation of the vertices. These are a kind of partially labeled digraphs. - Gus Wiseman, Mar 04 2019

Examples

			From _Gus Wiseman_, Mar 04 2019: (Start)
Inequivalent representatives of the a(2) = 10 digraphical necklace edge-sets:
  {}
  {(1,1)}
  {(1,2)}
  {(1,1),(1,2)}
  {(1,1),(2,1)}
  {(1,1),(2,2)}
  {(1,2),(2,1)}
  {(1,1),(1,2),(2,1)}
  {(1,1),(1,2),(2,2)}
  {(1,1),(1,2),(2,1),(2,2)}
(End)
		

Crossrefs

Cf. A000031 (binary necklaces), A000939 (cycle necklaces), A008965, A060690, A061417 (permutation necklaces), A184271, A192332 (graphical necklaces), A275527 (path necklaces), A323858 (toroidal necklaces), A323870.

Programs

  • Mathematica
    Table[Fold[ #1+EulerPhi[ #2] 2^(n^2 /#2)&, 0, Divisors[n]]/n, {n, 16}]
    (* second program *)
    rotdigra[g_,m_]:=Sort[g/.k_Integer:>If[k==m,1,k+1]];
    Table[Length[Select[Subsets[Tuples[Range[n],2]],#=={}||#==First[Sort[Table[Nest[rotdigra[#,n]&,#,j],{j,n}]]]&]],{n,0,4}] (* Gus Wiseman, Mar 04 2019 *)

Formula

a(n) = (1/n)*Sum_{ d divides n } phi(d)*2^(n^2/d) for n > 0, a(0) = 1.

Extensions

More terms from Wouter Meeussen, Jul 29 2003
a(0)=1 prepended by Gus Wiseman, Mar 04 2019

A324513 Number of aperiodic cycle necklaces with n vertices.

Original entry on oeis.org

1, 0, 0, 0, 2, 7, 51, 300, 2238, 18028, 164945, 1662067, 18423138, 222380433, 2905942904, 40864642560, 615376173176, 9880203467184, 168483518571789, 3041127459127222, 57926238289894992, 1161157775616335125, 24434798429947993043, 538583682037962702384
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2019

Keywords

Comments

We define an aperiodic cycle necklace to be an equivalence class of (labeled, undirected) Hamiltonian cycles under rotation of the vertices such that all n of these rotations are distinct.

Crossrefs

Cf. A000740, A000939, A001037 (binary Lyndon words), A008965, A059966 (Lyndon compositions), A060223 (normal Lyndon words), A061417, A064852 (if cycle is oriented), A086675, A192332, A275527, A323866 (aperiodic toroidal arrays), A323871.

Programs

  • Mathematica
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Union[Sort[Sort/@Partition[#,2,1,1]]&/@Permutations[Range[n]]],#==First[Sort[Table[Nest[rotgra[#,n]&,#,j],{j,n}]]]&&UnsameQ@@Table[Nest[rotgra[#,n]&,#,j],{j,n}]&]],{n,8}]
  • PARI
    a(n)={if(n<3, n==0||n==1, (if(n%2, 0, -(n/2-1)!*2^(n/2-2)) + sumdiv(n, d, moebius(n/d)*eulerphi(n/d)*(n/d)^d*d!/n^2))/2)} \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = A324512(n)/n.
a(2*n+1) = A064852(2*n+1)/2 for n > 0; a(2*n) = (A064852(2*n) - A002866(n-1))/2 for n > 1. - Andrew Howroyd, Aug 16 2019

Extensions

Terms a(10) and beyond from Andrew Howroyd, Aug 19 2019

A324514 Number of aperiodic permutations of {1..n}.

Original entry on oeis.org

1, 0, 3, 16, 115, 660, 5033, 39936, 362718, 3624920, 39916789, 478953648, 6227020787, 87177645996, 1307674338105, 20922779566080, 355687428095983, 6402373519409856, 121645100408831981, 2432902004460734000, 51090942171698415483, 1124000727695858073380
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2019

Keywords

Comments

A permutation is defined to be aperiodic if every cyclic rotation of {1..n} acts on the cycle decomposition to produce a different digraph.

Examples

			The a(4) = 16 aperiodic permutations:
  (1243) (1324) (1342) (1423)
  (2134) (2314) (2413) (2431)
  (3124) (3142) (3241) (3421)
  (4132) (4213) (4231) (4312)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],UnsameQ@@NestList[RotateRight[#/.k_Integer:>If[k==n,1,k+1]]&,#,n-1]&]],{n,6}]
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d)*(n/d)^d*d!); \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = A306669(n) * n.
a(n) = Sum_{d|n} mu(n/d)*(n/d)^d*d!. - Andrew Howroyd, Aug 19 2019

Extensions

Terms a(10) and beyond from Andrew Howroyd, Aug 19 2019

A306669 Number of aperiodic permutation necklaces of weight n.

Original entry on oeis.org

1, 0, 1, 4, 23, 110, 719, 4992, 40302, 362492, 3628799, 39912804, 479001599, 6226974714, 87178289207, 1307673722880, 20922789887999, 355687417744992, 6402373705727999, 121645100223036700, 2432902008176115023, 51090942167993548790, 1124000727777607679999
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2019

Keywords

Comments

A permutation is aperiodic if every rotation of {1...n} acts on the vertices of the cycle decomposition to produce a different digraph. A permutation necklace is an equivalence class of permutations under the action of rotation of vertices in the cycle decomposition. The corresponding action on words applies m -> m + 1 for m < n and n -> 1, and rotates once to the right. For example, (24531) first becomes (35142) under the application of cyclic rotation, and then is rotated right to give (23514).

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],UnsameQ@@NestList[RotateRight[#/.k_Integer:>If[k==n,1,k+1]]&,#,n-1]&]]/n,{n,6}]
  • PARI
    a(n) = (1/n)*sumdiv(n, d, moebius(n/d)*(n/d)^d*d!); \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = A324514(n)/n.
a(n) = (1/n)*Sum_{d|n} mu(n/d)*(n/d)^d*d!. - Andrew Howroyd, Aug 19 2019

Extensions

Terms a(10) and beyond from Andrew Howroyd, Aug 19 2019
Showing 1-10 of 15 results. Next