A270492 a(n) = gcd(r) where r ranges over the orders of all subgroups whose direct product gives the multiplicative group modulo n.
0, 0, 2, 2, 4, 2, 6, 2, 6, 4, 10, 2, 12, 6, 2, 2, 16, 6, 18, 2, 2, 10, 22, 2, 20, 12, 18, 2, 28, 2, 30, 2, 2, 16, 2, 2, 36, 18, 2, 2, 40, 2, 42, 2, 2, 22, 46, 2, 42, 20, 2, 2, 52, 18, 2, 2, 2, 28, 58, 2, 60, 30, 6, 2, 4, 2, 66, 2, 2, 2, 70, 2, 72, 36, 2, 2, 2, 2, 78, 2, 54, 40, 82, 2, 4, 42, 2, 2, 88, 2, 6, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
PARI
a(n)=gcd(znstar(n)[2]);
Formula
a(p) = p - 1 for odd primes p.
a(p^k) = phi(p^k) = (p-1)*p^(k-1) for odd primes p and k >= 1.
Extensions
Terms a(1) and a(2) changed from 1 to 0 by Antti Karttunen, Aug 07 2017