A348928 a(n) = gcd(n, A003958(n)), where A003958 is multiplicative with a(p^e) = (p-1)^e.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 3
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
Mathematica
f[p_, e_] := (p - 1)^e; a[n_] := GCD[n, Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Nov 07 2021 *)
-
PARI
A003958(n) = if(1==n,n,my(f=factor(n)); for(i=1,#f~,f[i,1]--); factorback(f)); A348928(n) = gcd(n, A003958(n));