A382662 The unitary totient function applied to the cubefree numbers (A004709).
1, 1, 2, 3, 4, 2, 6, 8, 4, 10, 6, 12, 6, 8, 16, 8, 18, 12, 12, 10, 22, 24, 12, 18, 28, 8, 30, 20, 16, 24, 24, 36, 18, 24, 40, 12, 42, 30, 32, 22, 46, 48, 24, 32, 36, 52, 40, 36, 28, 58, 24, 60, 30, 48, 48, 20, 66, 48, 44, 24, 70, 72, 36, 48, 54, 60, 24, 78, 40
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := p^e-1; uphi[1] = 1; uphi[n_] := Times @@ f @@@ FactorInteger[n]; cubeFreeQ[n_] := AllTrue[FactorInteger[n][[;; , 2]], # < 3 &]; uphi /@ Select[Range[100], cubeFreeQ]
-
PARI
uphi(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2]-1); } iscubefree(n) = {my(f = factor(n)); for(i=1, #f~, if(f[i, 2] > 2, return (0))); 1; } list(lim) = apply(uphi, select(iscubefree, vector(lim, i, i)));