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 A381799 #6 Mar 14 2025 20:06:38 %S A381799 0,0,1,0,1,0,1,2,0,1,1,2,3,4,0,1,0,1,2,4,0,1,3,1,2,4,5,6,8,0,1,1,2,3, %T A381799 4,8,9,0,1,1,2,4,7,8,1,3,5,6,9,10,12,0,1,2,4,8,0,1,1,2,3,4,8,9,10,14, %U A381799 16,0,1,1,2,4,5,8,12,16,1,3,6,7,9,12,15,18 %N A381799 Irregular triangle read by rows, where row n is a list of residues of powers of prime factors of n (mod n). %C A381799 Define S(p,n) to be the set of residues r (mod n) taken by the power range of prime divisor p, i.e., {p^m, m >= 1}. Examples: S(2,10) = {1, 2, 4, 8, 6}, while S(2,8) = {0, 1, 2, 4} and S(2,12) = {1, 2, 4, 8}; S(3,6) = {1, 3}, S(3,9) = {0, 1, 3}, S(3,12) = {1, 3, 9}, etc. %C A381799 Define T(n) to be the (sorted) union of S(p,n) for all prime factors p | n. %C A381799 Row n of this table is T(n). %C A381799 For n > 1, the intersection of row n of this table and row n of A038566 is {1}. Thus, 1 appears in each row except for n = 1, since p^0 = 1 for all primes p | n. %C A381799 The number 0 appears in T(p^m) (where p is prime and m >= 1) since p^m is congruent to 0 (mod p^m). %C A381799 Zero does not appear in T(n) for n in A024619. %H A381799 Michael De Vlieger, <a href="/A381799/b381799.txt">Table of n, a(n) for n = 1..17305</a> (rows n = 1..500, flattened.) %H A381799 Michael De Vlieger, <a href="/A381799/a381799.png">Plot k in row n at (x,y) = (k,-n)</a>, n = 1..36, showing reduced residues mod n in gray and labeling terms in row n. The number n appears on the left in red italic, and row length A381798(n) in blue at right. %H A381799 Michael De Vlieger, <a href="/A381799/a381799_1.png">Plot k in row n at (x,y) = (k,-n)</a>, n = 1..5000. %F A381799 Row 1 = {0} since 1 is the empty product. %F A381799 For prime p, row p is {0, 1}. %F A381799 For proper prime power p^m, m > 1, row p^m is the union of {0} and p^i, i < m. %F A381799 A381798(n) = length of row n. %e A381799 Triangle begins: %e A381799 n row n %e A381799 -------------------------- %e A381799 1: 0; %e A381799 2: 0, 1; %e A381799 3: 0, 1; %e A381799 4: 0, 1, 2; %e A381799 5: 0, 1; %e A381799 6: 1, 2, 3, 4; %e A381799 7: 0, 1; %e A381799 8: 0, 1, 2, 4; %e A381799 9: 0, 1, 3; %e A381799 10: 1, 2, 4, 5, 6, 8; %e A381799 11: 0, 1; %e A381799 12: 1, 2, 3, 4, 8, 9; etc. %e A381799 For n = 10, we have S(2,10) = {1, 2, 4, 8, 6}, S(5,10) = {1, 5}, thus T(10) = {1, 2, 4, 5, 6, 8}. %e A381799 For n = 12, we have S(2,12) = {1, 2, 4, 8}, S(3,12) = {1, 3, 9}, thus T(12) = {1, 2, 3, 4, 8, 9}. %e A381799 For n = 16, we have S(2,16) = {1, 2, 4, 8, 0}, thus T(16) = {0, 1, 2, 4, 8}. %e A381799 For n = 30, we have S(2,30) = {1, 2, 4, 8, 16}, S(3,30) = {1, 3, 9, 27, 21}, and S(5,30) = {1, 5, 25}, so T(30) = {1, 2, 3, 4, 5, 8, 9, 16, 21, 25, 27}, etc. %t A381799 {{0}}~Join~Table[Union@ Flatten@ Map[(p = #; NestWhileList[Mod[p*#, n] &, 1, UnsameQ, All]) &, FactorInteger[n][[All, 1]] ], {n, 2, 30}] %Y A381799 Cf. A024619, A038566, A121998, A381798. %K A381799 nonn,tabf %O A381799 1,8 %A A381799 _Michael De Vlieger_, Mar 07 2025