A348998 a(n) = A348928(A276086(n)), where A348928(n) = gcd(n, A003958(n)), and A003958 is multiplicative with a(p^e) = (p-1)^e, and A276086 gives the prime product form of primorial base expansion of n.
1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 3, 6, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18, 1, 2, 3, 6, 9, 18
Offset: 0
Links
Programs
-
PARI
A348998(n) = { my(m1=1, m2=1, p=2); while(n, m1 *= (p^(n%p)); m2 *= ((p-1)^(n%p)); n = n\p; p = nextprime(1+p)); gcd(m1,m2); };
Comments