login
A075146
n-th perfect power - n-th prime: pp(n) - prime(n).
0
-1, 1, 3, 2, 5, 12, 10, 13, 13, 20, 33, 44, 59, 78, 78, 75, 85, 108, 129, 145, 152, 164, 173, 200, 227, 242, 258, 293, 332, 371, 385, 398, 439, 486, 527, 578, 627, 678, 733, 788, 821, 843, 898, 963, 1028, 1097, 1120, 1146, 1217, 1292, 1367, 1442, 1487, 1513, 1592
OFFSET
1,3
COMMENTS
Besides first 1, all other terms are positive. At n>16, the function pp(n)-p(n) is (apparently) monotonically increasing.
FORMULA
a(n) = A001597(n) - A000040(n).
EXAMPLE
pp(3)-p(3)= 8-5=3.
MATHEMATICA
Module[{upto=2000, pp, pr, len}, pp=Flatten[Table[Range[Surd[upto, n]]^n, {n, 2, Sqrt[ upto]}]]//Union; pr=Prime[Range[PrimePi[upto]]]; len=Min[ Length[ pp], Length[pr]]; #[[1]]-#[[2]]&/@Thread[ {Take[pp, len], Take[ pr, len]}]] (* Harvey P. Dale, Feb 23 2018 *)
PROG
(PARI) lista(nn) = {vec = vector(nn, i, i); pp = select(i->((ispower(i) || (i==1))), vec); for (i = 1, #pp, print1(pp[i] - prime(i), ", "); ); } \\ Michel Marcus, Oct 02 2013
CROSSREFS
Cf. A001597.
Sequence in context: A305878 A093924 A130597 * A353403 A300939 A062941
KEYWORD
easy,sign
AUTHOR
Zak Seidov, Oct 11 2002
STATUS
approved