This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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(n-k) : 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

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

Last modified December 11 22:41 EST 2018. Contains 318052 sequences. (Running on oeis4.)