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 A339942 #18 Feb 01 2021 13:20:54 %S A339942 1,0,2,0,0,6,0,8,8,8,0,0,40,60,20,0,0,468,192,48,12,0,0,462,3150,1176, %T A339942 210,42,0,128,4192,27872,6592,1312,192,32,0,0,57402,182790,99630, %U A339942 19656,2970,378,54,0,0,67440,1795320,1594640,146200,22000,2840,320,40,0,0,61050,17433130,17373620,4289340,662860,85910,9790,990,110 %N A339942 Triangle read by rows: T(n,k) is the number of permutations of the cyclic group Z/nZ whose longest embedded arithmetic progression has length k. %C A339942 For the case k=2, it can be proved that if n is a power of 2, then T(n,2)=2^{n-1}; otherwise T(n,2)=0 (Lemma 8 of Goh and Zhao (2020)). It can also be shown that T(n,n) = n*phi(n), where phi is the Euler totient function. %H A339942 M. K. Goh and R. Y. Zhao, <a href="https://arxiv.org/abs/2012.12339">Arithmetic subsequences in a random ordering of an additive set</a>, arXiv:2012.12339 [math.CO], 2020. %F A339942 T(n,n) = n*A000010(n). %e A339942 Triangle T(n,k) begins: %e A339942 n/k 1 2 3 4 5 6 7 8 9 10 11 %e A339942 1 1 %e A339942 2 0 2 %e A339942 3 0 0 6 %e A339942 4 0 8 8 8 %e A339942 5 0 0 40 60 20 %e A339942 6 0 0 468 192 48 12 %e A339942 7 0 0 462 3150 1176 210 42 %e A339942 8 0 128 4192 27872 6592 1312 192 32 %e A339942 9 0 0 57402 182790 99630 19656 2970 378 54 %e A339942 10 0 0 67440 1795320 1594640 146200 22000 2840 320 40 %e A339942 11 0 0 61050 17433130 17373620 4289340 662860 85910 9790 990 110 %Y A339942 Cf. A000010, A002618, A339941. %K A339942 nonn,tabl %O A339942 1,3 %A A339942 _Marcel K. Goh_, Dec 23 2020