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.
%I A057741 #16 Jul 02 2025 16:02:00 %S A057741 1,1,1,3,1,3,2,1,5,0,2,1,5,0,0,4,1,7,2,0,0,2,1,7,0,0,0,0,6,1,9,0,2,0, %T A057741 0,0,4,1,9,2,0,0,0,0,0,6,1,11,0,0,4,0,0,0,0,4,1,11,0,0,0,0,0,0,0,0,10, %U A057741 1,13,2,2,0,2,0,0,0,0,0,4,1,13,0,0,0,0,0,0,0,0,0,0,12,1,15,0,0,0,0,6,0,0 %N A057741 Table T(n,k) giving number of elements of order k in dihedral group D_{2n} of order 2n, n >= 1, 1<=k<=g(n), where g(n) = 2 if n=1 else g(n) = n. %C A057741 Note that D_2 equals the cyclic group of order 2. %F A057741 If k<>2 and k does not divide n, this number is 0; if k<>2 and k divides n, this number is phi(k), where phi is the Euler totient function; if k=2, this number is n for odd n and n+1 for even n. %e A057741 1,1; %e A057741 1,3; %e A057741 1,3,2; %e A057741 1,5,0,2; %e A057741 1,5,0,0,4; ... %t A057741 t[n_, k_] /; k != 2 && ! Divisible[n, k] = 0; t[n_, k_] /; k != 2 && Divisible[n, k] := EulerPhi[k]; t[n_, 2] := n + 1 - Mod[n, 2]; Flatten[Table[t[n, k], {n, 1, 14}, {k, 1, If[n == 1, 2, n]}]] (* _Jean-François Alcover_, Jun 19 2012, from formula *) %t A057741 row[n_] := (orders = PermutationOrder /@ GroupElements[DihedralGroup[n]]; Table[Count[orders, k], {k, 1, Max[orders]}]); Table[row[n], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Aug 31 2016 *) %Y A057741 Cf. A057731, A054522, A057740. %K A057741 nonn,tabf,easy,nice %O A057741 1,4 %A A057741 _Roger Cuculière_, Oct 29 2000 %E A057741 More terms from _James Sellers_, Oct 30 2000