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-3 of 3 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

A094154 Bisection of A000939.

Original entry on oeis.org

1, 4, 54, 2246, 164950, 18423144, 2905943328, 615376173184, 168483518571798, 57926238289970076, 24434798429947993054, 12408968034664788792008, 7468360391233437715595634, 5256695596753687250025931048, 4278271932454694494134007741950, 3986830862631720154048770746485900
Offset: 1

Views

Author

N. J. A. Sloane, May 05 2004

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory); f:=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;

Formula

See Maple line.

A358328 Triangle read by rows: T(n,k) is the number of polygons with 2*n sides, of which k run through the center of a circle, on the circumference of which the 2*n vertices of the polygon are arranged at equal spacing, up to rotation.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 4, 4, 4, 2, 98, 120, 84, 24, 6, 5648, 6912, 4032, 1344, 288, 40, 532344, 631680, 351360, 118408, 26400, 3840, 322, 72724122, 84211200, 45907200, 15436800, 3513600, 552960, 57600, 3294, 13577195574, 15432560640, 8305920000, 2786273280, 643507200, 106122240, 12418560, 967680, 40320
Offset: 0

Views

Author

Ludovic Schwob, Nov 09 2022

Keywords

Comments

By "2*n-sided polygons" we mean the polygons that can be drawn by connecting 2*n equally spaced points on a circle.
T(0,0)=0 and T(0,1)=1 by convention.
The sequence is limited to even-sided polygons, since all odd-sided polygons have no side passing through the center.

Examples

			Triangle begins:
    0;
    0,   1;
    1,   0,   1;
    4,   4,   4,   2;
   98, 120,  84,  24,   6;
		

Crossrefs

Row sums give A094155(n).
Cf. A330662.
Showing 1-3 of 3 results.