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-4 of 4 results.

A000939 Number of inequivalent n-gons.

Original entry on oeis.org

1, 1, 1, 2, 4, 14, 54, 332, 2246, 18264, 164950, 1664354, 18423144, 222406776, 2905943328, 40865005494, 615376173184, 9880209206458, 168483518571798, 3041127561315224, 57926238289970076, 1161157777643184900, 24434798429947993054, 538583682082245127336
Offset: 1

Views

Author

Keywords

Comments

Here two n-gons are said to be equivalent if they differ in starting point, orientation, or by a rotation (but not by a reflection - for that see A000940).
Number of cycle necklaces on n vertices, defined as equivalence classes of (labeled, undirected) Hamiltonian cycles under rotation of the vertices. The path version is A275527. - Gus Wiseman, Mar 02 2019

Examples

			Possibilities for n-gons without distinguished vertex can be encoded as permutation classes of vertices, two permutations being equivalent if they can be obtained from each other by circular rotation, translation mod n or complement to n+1.
n=3: 123.
n=4: 1234, 1243.
n=5: 12345, 12354, 12453, 13524.
n=6: 123456, 123465, 123564, 123645, 123654, 124365, 124635, 124653, 125364, 125463, 125634, 126435, 126453, 135264.
		

References

  • 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

Cf. A000940. Bisections give A094154, A094155.
For star polygons see A231091.

Programs

  • Maple
    with(numtheory):
    # for n odd:
    Ed:= proc(n) local t1, d; t1:=0; for d from 1 to n do
           if n mod d = 0 then t1:= t1+phi(n/d)^2*d!*(n/d)^d fi od:
           t1/(2*n^2)
         end:
    # for n even:
    Ee:= proc(n) local t1, d; t1:= 2^(n/2)*(n/2)*(n/2)!; for d
           from 1 to n do if n mod d = 0 then t1:= t1+
           phi(n/d)^2*d!*(n/d)^d; fi od: t1/(2*n^2)
         end:
    A000939:= n-> if n mod 2 = 0 then ceil(Ee(n)) else ceil(Ed(n)); fi:
    seq(A000939(n), n=1..25);
  • Mathematica
    a[n_] := (t = If[OddQ[n], 0, 2^(n/2)*(n/2)*(n/2)!]; Do[If[Mod[n, d]==0, t = t+EulerPhi[n/d]^2*d!*(n/d)^d], {d, 1, n}]; t/(2*n^2)); a[1] := 1; a[2] := 1; Print[a /@ Range[1, 450]] (* Jean-François Alcover, May 19 2011, after Maple prog. *)
    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}]]]&]],{n,8}] (* Gus Wiseman, Mar 02 2019 *)
  • PARI
    a(n)={if(n<3, n>=0, (if(n%2, 0, (n/2-1)!*2^(n/2-2)) + sumdiv(n, d, eulerphi(n/d)^2 * d! * (n/d)^d)/n^2)/2)} \\ Andrew Howroyd, Aug 17 2019

Formula

For formula see Maple lines.
a(2*n + 1) = A002619(2*n + 1)/2 for n > 0; a(2*n) = (A002619(2*n) + A002866(n-1))/2 for n > 1. - Andrew Howroyd, Aug 17 2019
a(n) ~ sqrt(2*Pi)/2 * n^(n-3/2) / e^n. - Ludovic Schwob, Nov 03 2022

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 05 2004
Added a(1) = 1 and a(2) = 1 by Gus Wiseman, Mar 02 2019

A370459 Number of unicursal stars with n vertices.

Original entry on oeis.org

0, 0, 1, 1, 5, 19, 112, 828, 7441, 76579, 871225, 10809051, 144730446, 2079635889, 31912025537, 520913578812, 9013780062785, 164829273635749, 3176388519597555, 64343477504391475, 1366925655386979893, 30390554390984325019, 705740995420852895453
Offset: 3

Views

Author

Adam M. Scherlis, Feb 19 2024

Keywords

Comments

A unicursal star is a closed loop formed by diagonals of a regular n-gon.
These are Hamiltonian cycles on the graph complement of the n-cycle.
Allowing polygon diagonals, but not sides, is equivalent to requiring every edge to cross at least one other edge.
These are counted up to rotation and reflection, i.e., modulo dihedral symmetry of the n-gon.
Inspired by a unicursal dodecagram drawn by Gordon FitzGerald (see links).

Examples

			For n=5, there is only the regular pentagram {5/2}.
For n=6, there is only the unicursal hexagram.
For n=7, in addition to the two regular heptagrams {7/2} and {7/3}, there are three nontrivial unicursal heptagrams represented by:
 (0, 2, 4, 1, 6, 3, 5, 0)
 (0, 2, 5, 1, 3, 6, 4, 0)
 (0, 2, 5, 1, 4, 6, 3, 0).
		

Crossrefs

Cf. A000940 (polygon sides allowed).
Cf. A055684 (cases with dihedral symmetry only).
Cf. A002816 (rotations and reflections counted separately).
Cf. A231091 (up to rotations only), A370769 (achiral).

Programs

  • PARI
    \\ Requires a370068 from A370068.
    Ro(n)=-(-1)^n + subst(serlaplace(polcoef(((1 - x)^2)/(2*(1 + x)*(1 + (1 - 2*y)*x + 2*y*x^2)) + O(x*x^n), n)), y, 1)
    Re(n)=subst(serlaplace(polcoef((1 - x - 2*x^2)/(4*(1 + (1 - 2*y)*x + 2*y*x^2)) + O(x*x^n), n)), y, 1)
    a(n)={if(n<3, 0, (if(n%2, 2*Ro(n\2), Re(n/2)) + a370068(n))/4)} \\ Andrew Howroyd, Mar 01 2024

Formula

a(n) = (A231091(n) + A370769(n))/2. - Andrew Howroyd, Mar 06 2024

Extensions

a(14) onwards from Andrew Howroyd, Feb 26 2024

A370068 Number of nonequivalent directed unicursal star polygons (no edge joins adjacent vertices) that can be formed by connecting the vertices of a regular n-gon up to rotations.

Original entry on oeis.org

0, 0, 0, 0, 2, 1, 10, 47, 350, 3005, 28722, 302519, 3471738, 43181993, 578730766, 8317664191, 127644961618, 2083638325661, 36055062511490, 659316772258655, 12705552903848466, 257373902883624297, 5467702595346969530, 121562217391867941767
Offset: 1

Views

Author

Andrew Howroyd, Feb 23 2024

Keywords

Comments

Directed means that the direction of travel is significant.

Crossrefs

Cf. A002619 (if edges may join adjacent vertices), A231091 (undirected), A326411, A370459.

Programs

  • PARI
    Q(n,k)={subst(serlaplace(polcoef((1 - 2*x - x^2)/((1 + x)*(1 + (1 - y)*x + y*x^2)) + O(x^n), n-1)), y, k)}
    E(r,d)={eulerphi(d)*Q(r,d) + 2*(-1)^r}
    a370068(n)={if(n<3, 0, sumdiv(n,d,eulerphi(d)*E(n/d,d))/n)}

A370769 Number of achiral unicursal star polygons (no edge joins adjacent vertices) that can be formed by connecting the vertices of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 5, 11, 49, 123, 521, 1583, 6581, 23239, 95509, 384771, 1570265, 7106995, 28869825, 145034327, 587270877, 3242792607, 13100475021, 78866628011, 318067071169, 2073381189259, 8350998470777, 58602568320255, 235794888434053, 1772311322357623
Offset: 1

Views

Author

Andrew Howroyd, Mar 01 2024

Keywords

Comments

Achiral means that the polygon has an axis of reflective symmetry.

Crossrefs

Cf. A231091 (stars up to rotation), A370459 (up to rotation and reflection).

Programs

  • PARI
    Ro(n)=-(-1)^n + subst(serlaplace(polcoef(((1 - x)^2)/(2*(1 + x)*(1 + (1 - 2*y)*x + 2*y*x^2)) + O(x*x^n), n)), y, 1)
    Re(n)=subst(serlaplace(polcoef((1 - 3*x)/(8*(1 + (1 - 2*y)*x + 2*y*x^2)) + O(x*x^n), n)), y, 1)
    a(n) = if(n < 3, 0, if(n % 2, Ro(n\2), Re(n/2)))

Formula

a(2*n+1) = A370766(n)/2 - A370768(n-1) for n >= 1.
a(2*n) = (A370766(n-1)/2 - A370768(n-2) + A370766(n)/4 - A370768(n-1) + A283184(n-1)/2)/2 for n >= 2.
Showing 1-4 of 4 results.