login
A132349
If n is a k-th power with k >= 2 then a(n) = k, otherwise a(n) = 0.
4
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,4
LINKS
MATHEMATICA
a[n_] := Boole[(g = GCD @@ FactorInteger[n][[;; , 2]]) > 1] * g; Array[a, 100] (* Amiram Eldar, Aug 13 2024 *)
PROG
(PARI) r(n) = for(j=1, n, print1(ispower(j)", "));
r(100)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 11 2007
STATUS
approved