login
Largest integer power m (with 0 to stand for infinity) for which a representation of the form n = k^m exists (for some k >= 1) multiplied by -1 when k is prime.
1

%I #5 Dec 18 2016 12:50:26

%S 0,-1,-1,-2,-1,1,-1,-3,-2,1,-1,1,-1,1,1,-4,-1,1,-1,1,1,1,-1,1,-2,1,-3,

%T 1,-1,1,-1,-5,1,1,1,2,-1,1,1,1,-1,1,-1,1,1,1,-1,1,-2,1,1,1,-1,1,1,1,1,

%U 1,-1,1,-1,1,1,-6,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-4,1,-1,1,1,1,1,1

%N Largest integer power m (with 0 to stand for infinity) for which a representation of the form n = k^m exists (for some k >= 1) multiplied by -1 when k is prime.

%C This sequence reveals, among the positive integers, which are the unit, the primes, the perfect powers (with |a(n)| as largest exponent) telling whether these are perfect powers of either primes or composites and finally which are non-perfect powers composites per the following:

%C a(n) < -1: perfect powers of primes (largest exponent = |a(n)|)

%C a(n) = -1: primes (not perfect powers)

%C a(n) = 0: (standing for infinity): unit, perfect power of unit

%C a(n) = +1: composites (not perfect powers)

%C a(n) > +1: perfect powers of composites (largest exponent = |a(n)|).

%H Daniel Forgues, <a href="/A158052/b158052.txt">Table of n, a(n) for n=1..100000</a>

%F a(n) = m * (-1)^{pi(k) - pi(k-1)} where m is the largest exponent of k^m = n for some k >= 1 and pi(k) is the prime counting function evaluated at k.

%F a(n) = A052409(n) * (-1)^{Pi(k(n)) - Pi(k(n)-1)}, with k(n) = A052410(n).

%Y Cf. A052409 a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k).

%Y Cf. A052410 Value of a in a^p=n, where p is the largest power given by A052409.

%Y Cf. A000040 The prime numbers.

%Y Cf. A000961 Prime powers p^k (p prime, k >= 0).

%Y Cf. A001597 Perfect powers: m^k where m is an integer and k >= 2.

%K sign

%O 1,4

%A _Daniel Forgues_, Mar 12 2009