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 A337938 #12 Apr 27 2021 11:51:28 %S A337938 0,0,1,0,1,2,0,2,1,0,1,2,3,0,3,2,1,0,1,2,3,4,0,4,3,2,1,0,1,2,3,4,5,0, %T A337938 5,4,3,2,1,0,1,2,3,4,5,6,0,6,5,4,3,2,1,0,1,2,3,4,5,6,7,0,7,6,5,4,3,2, %U A337938 1,0,1,2,3,4,5,6,7,8,0,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,9,0,9,8,7,6,5,4,3,2,1 %N A337938 Irregular triangle read by rows: T(n, k) gives the primitive period of the sequence {k (Modd n)}_{k >= 0}, for n >= 1. %C A337938 The length of row n is 1 for n = 1, 2 for n = 2, and 2*n for n >= 3. %C A337938 The modified modular equivalence relation Modd n is defined, for integer k and positive integer n, by k (Modd n) = k (mod n) if floor(k/n) is even, and -k (mod n) if floor(k/n) is odd. The smallest nonnegative complete residue system modulo n, namely RS(n) = {0, 1, ..., n-1}, is used. See the W. Lang link, Definition 4, eq. (69), p. 25 - 26. %C A337938 In order to have row length 2*n for all n >= 1 one could use for n = 1 and 2 the imprimitive periods 0, 0 and 0, 1, 0, 1, respectively. %C A337938 The name Modd n derives from the fact that the multiplicative (but not additive ) group Modd n has the smallest positive reduced residue system with only odd numbers, named RRSodd(n), as elements (for n = 0 RRS(n) = {0}, but here it is taken as {1}). This group is isomorphic to the Galois group G(rho(n)) = Gal(Q(rho(n))/Q), with rho(n) = 2*cos(pi/n). See the W. Lang link. %H A337938 Wolfdieter Lang, <a href="http://arxiv.org/abs/1210.1018">The field Q(2cos(pi/n)), its Galois group and length ratios in the regular n-gon</a>, arXiv:1210.1018 [math.GR], 2012, 2017. %F A337938 T(n,k) = k (Modd n), for n >= 1, and k = 0 for n = 1, k = 0, 1 for n = 2, and k = 0, 1, ..., 2*n - 1, for n >= 3. For k (Modd n) see the comment above. %e A337938 The irregular triangle begins: %e A337938 n \ k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 .. %e A337938 1: 0 %e A337938 2: 0 1 %e A337938 3: 0 1 2 0 2 1 %e A337938 4: 0 1 2 3 0 3 2 1 %e A337938 5: 0 1 2 3 4 0 4 3 2 1 %e A337938 6: 0 1 2 3 4 5 0 5 4 3 2 1 %e A337938 7: 0 1 2 3 4 5 6 0 6 5 4 3 2 1 %e A337938 8: 0 1 2 3 4 5 6 7 0 7 6 5 4 3 2 1 %e A337938 9: 0 1 2 3 4 5 6 7 8 0 8 7 6 5 4 3 2 1 %e A337938 10 :0 1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1 %e A337938 ... %e A337938 T(1, 0) = 0 because {k (Modd 1)}_{k >= 0} is the 0 sequence A000007: 0 (Modd 1) = 0 (mod 1) = 0, 1 (Modd 1) = -1 (mod 1) = 0, 2 (Modd 1) = 2 (mod 1) = 0, ... . %e A337938 T(7, 6) = 6 because floor(6/7) = 0, which is even, hence 6 (Modd 7) = 6 (mod 7) = 6. %e A337938 T(7, 8) = 6 because floor(8/7) = 1, which is odd, hence 8 (Modd 7) = -8 (mod 7) = 6. %Y A337938 Cf. Periodic sequences for n = 1, 2, ..., 7: A000007, A000035, A193680, A193682, A203571, A203572. %Y A337938 Cf. A002262 (for mod n), A053616 (as a triangle, for mod* n). %K A337938 nonn,tabf,easy %O A337938 1,6 %A A337938 _Wolfdieter Lang_, Oct 25 2020