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.

A039745 Diameter of symmetric group S_n when generated by (1,2) and (1,2,3,...,n).

This page as a plain text file.
%I A039745 #47 Jul 21 2025 03:06:23
%S A039745 0,1,2,6,11,18,25,35,45,58,71,87,103,122,141
%N A039745 Diameter of symmetric group S_n when generated by (1,2) and (1,2,3,...,n).
%C A039745 a(n) is smallest number such that every element of S_n can be written as a product of at most a(n) terms each of which is the transposition (1,2) or the n-cycle (1,2,3,...,n).
%C A039745 The distinction between A039745 (this sequence) and A186783 comes from whether we treat the Cayley graph of the generating set as directed or undirected (alternatively, whether we allow multiplication by inverses of generators when constructing elements). A039745 deals with the directed Cayley graph, while A186783 deals with the undirected one. - _Max Alekseyev_, Sep 09 2011
%H A039745 Dmytro Fedoriaka, <a href="https://github.com/cayleypy/cayleypy/pull/84">Growth function for n=15</a>.
%e A039745 a(3)=2 because (1,3,2) = (1,2,3)(1,2).
%t A039745 a[n_] := GraphDiameter[CayleyGraph[SymmetricGroup[n]]] (* _Ben Whitmore_, Nov 13 2020 *)
%o A039745 (Sage) def a(n): return PermutationGroup([[(1,2)],[tuple(1..n)]]).cayley_graph().diameter() # _Max Alekseyev_, Mar 02 2010
%Y A039745 Cf. A378881 (antipodal permutations), A186144 (number of them).
%Y A039745 Cf. A186783 (LRE diameter).
%K A039745 hard,nonn,nice,more
%O A039745 1,3
%A A039745 _David desJardins_
%E A039745 a(12)-a(13) by _Ben Whitmore_, Nov 12 2020
%E A039745 a(14) by _Dmytro Fedoriaka_, Jun 30 2025
%E A039745 a(15) by _Dmytro Fedoriaka_, Jul 14 2025