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 A066799 #25 Aug 18 2019 16:38:17 %S A066799 1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,4,1,1,1,2,1,4,2,1,1,1,1,1,2,1, %T A066799 3,1,1,1,1,1,1,1,6,1,1,1,1,2,2,1,2,3,2,6,1,1,1,1,1,4,1,6,1,1,4,1,1,1, %U A066799 1,1,4,1,2,2,3,4,10,1,1,1,2,1,2,2,1,1,6,2,5,2,1,1,1,1,2,1,1,1,2,1,1,5,2,12 %N A066799 Square array read by antidiagonals of eventual period of powers of k mod n; period of repeating digits of 1/n in base k. %C A066799 The determinant of the n X n matrix made from the northwest corner of this array is 0^(n-1). - _Iain Fox_, Mar 12 2018 %H A066799 Iain Fox, <a href="/A066799/b066799.txt">Antidiagonals n = 1..141 of array, flattened</a> %F A066799 T(n, k) = T(n, k-n) if k > n. %F A066799 T(n, n) = T(n, n+1) = 1. %F A066799 T(n, n-1) = 2. %e A066799 Rows start: 1,1,1,1,1,...; 1,1,1,1,1,...; 1,2,1,1,2,...; 1,1,2,1,1; 1,4,4,2,1,... T(3,2)=2 since the powers of 2 become 1,2,1,2,1,2,... mod 3 with period 2. T(4,2)=1 since the powers of 2 become 1,2,0,0,0,0,... mod 4 with eventual period 1. %e A066799 Beginning of array: %e A066799 +-----+-------------------------------------------------------------------- %e A066799 | n\k | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... %e A066799 +-----+-------------------------------------------------------------------- %e A066799 | 1 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... %e A066799 | 2 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... %e A066799 | 3 | 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, ... %e A066799 | 4 | 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, ... %e A066799 | 5 | 1, 4, 4, 2, 1, 1, 4, 4, 2, 1, 1, 4, 4, 2, 1, 1, ... %e A066799 | 6 | 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, ... %e A066799 | 7 | 1, 3, 6, 3, 6, 2, 1, 1, 3, 6, 3, 6, 2, 1, 1, 3, ... %e A066799 | 8 | 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, ... %e A066799 | ... | %t A066799 t[n_, k_] := For[p = PowerMod[k, n, n]; m = n + 1, True, m++, If[PowerMod[k, m, n] == p, Return[m - n]]]; Flatten[Table[t[n - k + 1, k], {n, 1, 14}, {k, n, 1, -1}]] (* _Jean-François Alcover_, Jun 04 2012 *) %o A066799 (PARI) a(n, k) = my(p=k^n%n); for(m=n+1, +oo, if(k^m%n==p, return(m-n))) \\ _Iain Fox_, Mar 12 2018 %Y A066799 Columns are A000012, A007733, A007734, A007735, A007736, A007737, A007738, A007739, A007740, A007732. A002322 is the highest value in each row and the least common multiple of each row, while the number of distinct values in each row is A066800. %K A066799 nonn,tabl,base %O A066799 1,9 %A A066799 _Henry Bottomley_, Dec 20 2001