login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175781 a(n) = n^(1/k) with the smallest k>1 such that n is a k-th power, taking k=1 if no such k>1 exists. 2
1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 12, 13, 14, 15, 4, 17, 18, 19, 20, 21, 22, 23, 24, 5, 26, 3, 28, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 7, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 8, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(32) = 2 since the least k, in this case 5, yields 32^(1/5) = 2.

MAPLE

f:= proc(n) local F, m;

     F:= ifactors(n)[2];

     m:= igcd(op(map(t->t[2], F)));

     if m = 1 then n

     else m:= min(numtheory:-factorset(m)); mul(t[1]^(t[2]/m), t=F)

     fi

end proc:

map(f, [$1..100]); # Robert Israel, Jan 10 2018

MATHEMATICA

perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; f[n_] := If[ perfectPowerQ@ n, k = 2; While[ !IntegerQ[n^(1/k)], k++]; n^(1/k), n]; Array[f, 75] (* Robert G. Wilson v, Jan 09 2018 *)

PROG

(PARI) a(n) = my(p = ispower(n)); if (!p, n, sqrtnint(n, divisors(p)[2])); \\ Michel Marcus, Jan 02 2018

CROSSREFS

Cf. A007947, A052410.

Sequence in context: A243074 A304776 A052410 * A072775 A304768 A243057

Adjacent sequences:  A175778 A175779 A175780 * A175782 A175783 A175784

KEYWORD

nonn

AUTHOR

Vincenzo Librandi, Sep 03 2010

EXTENSIONS

Edited by the Associate Editors of the OEIS, Sep 03 2010

a(32) corrected by Gionata Neri, Jan 02 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 14 19:07 EST 2018. Contains 317214 sequences. (Running on oeis4.)