

A080732


Smallest distance from n to a prime power (as defined in A246655).


4



1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,21


COMMENTS

a(n)=min (abs(nk) : where k runs through the prime powers)


LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000


MATHEMATICA

nn = 100; pp = Select[Range[2, Prime[1 + PrimePi[nn]]], Length[FactorInteger[#]] == 1 &]; Table[Min[Abs[n  pp]], {n, nn}] (* T. D. Noe, Mar 14 2012 *)


CROSSREFS

Cf. A051699, A246547, A301295.
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean.  N. J. A. Sloane, Mar 24 2018
Sequence in context: A144627 A135929 A080733 * A301295 A215036 A294448
Adjacent sequences: A080729 A080730 A080731 * A080733 A080734 A080735


KEYWORD

nonn


AUTHOR

Benoit Cloitre, Mar 08 2003


STATUS

approved



