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 A337632 #26 Sep 08 2022 08:46:25 %S A337632 1,1,2,1,3,2,1,4,2,3,1,5,2,3,2,1,6,4,6,4,6,1,7,2,3,4,3,2,1,8,2,5,2,5, %T A337632 2,5,1,9,2,3,4,3,2,7,2,1,10,4,6,4,10,4,6,4,10,1,11,2,3,2,3,6,3,2,3,2, %U A337632 1,12,4,9,4,9,4,9,4,9,4,9,1,13,2,3,4,5,2 %N A337632 Triangle read by rows: T(n,k) is the number of nonnegative integers m < n such that m^k - m == 0 (mod n), where 0 <= k < n. %H A337632 Peter Kagey, <a href="/A337632/b337632.txt">Table of n, a(n) for n = 1..10011</a> (first 141 rows, flattened) %F A337632 T(n,k) = A334006(n,k) * A337633(n,k). %e A337632 Triangle begins: %e A337632 n\k| 0 1 2 3 4 5 6 7 8 9 %e A337632 ---+-------------------------------- %e A337632 1 | 1; %e A337632 2 | 1, 2; %e A337632 3 | 1, 3, 2; %e A337632 4 | 1, 4, 2, 3; %e A337632 5 | 1, 5, 2, 3, 2; %e A337632 6 | 1, 6, 4, 6, 4, 6; %e A337632 7 | 1, 7, 2, 3, 4, 3, 2; %e A337632 8 | 1, 8, 2, 5, 2, 5, 2, 5; %e A337632 9 | 1, 9, 2, 3, 4, 3, 2, 7, 2; %e A337632 10 | 1, 10, 4, 6, 4, 10, 4, 6, 4, 10; %e A337632 ... %e A337632 T(10,2) = 4 because %e A337632 0^2 - 0 == 0 (mod 10), %e A337632 1^2 - 1 == 0 (mod 10), %e A337632 5^2 - 5 == 0 (mod 10), and %e A337632 6^2 - 6 == 0 (mod 10). %o A337632 (Haskell) %o A337632 a337632t n k = length $ filter (\m -> (m^k - m) `mod` n == 0) [0..n-1] %o A337632 (PARI) T(n,k) = sum(m=0, n-1, Mod(m,n)^k == Mod(m,n)); \\ _Michel Marcus_, Sep 13 2020 %o A337632 (Magma) [[#[m: m in [0..n-1] | m^k mod n eq m]: k in [0..n-1]]: n in [1..17]]; // _Juri-Stepan Gerasimov_, Oct 12 2020 %Y A337632 Cf. A334006, A337633. %K A337632 nonn,tabl %O A337632 1,3 %A A337632 _Peter Kagey_, Sep 12 2020