A132349 If n is a k-th power with k >= 2 then a(n) = k, otherwise a(n) = 0.
0, 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := Boole[(g = GCD @@ FactorInteger[n][[;;,2]]) > 1] * g; Array[a, 100] (* Amiram Eldar, Aug 13 2024 *)
-
PARI
r(n) = for(j=1,n,print1(ispower(j)",")); r(100)