A323021 A way to generate a minimal generating set of (Z/nZ)* whose elements are multiplicatively independent for every n: row n lists the elements of S(n), where S(n) is defined in the comment section. Here (Z/nZ)* is the multiplicative group of integers modulo n.
2, 3, 2, 5, 3, 5, 7, 2, 7, 2, 5, 7, 2, 3, 7, 11, 5, 15, 3, 11, 2, 11, 17, 8, 10, 13, 5, 7, 13, 17, 2, 15, 2, 15, 17, 2, 7, 11, 3, 5, 31, 13, 23, 3, 22, 31, 19, 29, 2, 21, 14, 28, 17, 21, 31, 6, 29, 31, 3, 13, 23, 11, 37, 5, 5, 17, 31, 37, 3, 27, 35, 37, 27, 41
Offset: 3
Examples
Table begins (1) Empty set; (2) Empty set; (3) {2}; (4) {3}; (5) {2}; (6) {5}; (7) {3}; (8) {5, 7}; (9) {2}; (10) {7}; ... Example shows that S(560) = {241, 337, 351, 421}: (Start) Since 560 = 16*5*7, we have S(560) = {1 <= x <= 560: x == 2 (mod 5) and x == 1 (mod 16*7), or x == 3 (mod 7) and x == 1 (mod 16*5), or x == 5 (mod 16) and x == 1 (mod 5*7), or x == 15 (mod 16) and x == 1 (mod 5*7)} = {241, 337, 351, 421}. To find the index of a number, say, 403, with respect to the base (241, 337, 351, 421) modulo 560, suppose 241^a * 337^b * 351^c * 421^d == 403 (mod 560). Then we have: - Modulo 16: 15^c * 5^d == 3 (mod 16) => c = 1, d = 3; - Modulo 5: 2^b == 3 (mod 5) => b = 3; - Modulo 7: 3^a == 4 (mod 7) => a = 4. So the index of 403 with respect to the base (241, 337, 351, 421) modulo 560 is (4, 3, 1, 3). Note that the bases here are ordered. So the index of 403 with respect to the base (337, 241, 421, 351) modulo 560 is (3, 4, 3, 1). (End)
Links
- Jianing Song, Rows n = 3..1000
- Wikipedia, Multiplicative group of integers modulo n.
Programs
-
PARI
a(n) = my(v=vector(#znstar(n)[2]), f=factor(n)); if(n%2||n%8==4, for(i=1, #v, v[i]=lift(chinese(znprimroot(f[i,1]^f[i,2]), Mod(1, n/f[i,1]^f[i,2]))))); if(n%4==2, for(i=1, #v, v[i]=lift(chinese(znprimroot(f[i+1,1]^f[i+1,2]), Mod(1, n/f[i+1,1]^f[i+1,2]))))); if(n%8==0, v[1]=lift(chinese(Mod(5, 2^f[1,2]), Mod(1, n/2^f[1,2]))); v[2]=lift(chinese(Mod(-1, 2^f[1,2]), Mod(1, n/2^f[1,2]))); for(i=3, #v, v[i]=lift(chinese(znprimroot(f[i-1,1]^f[i-1,2]), Mod(1, n/f[i-1,1]^f[i-1,2]))))); v=vecsort(v); v
Extensions
Name simplified by Jianing Song, Mar 16 2019
Comments