login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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
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: A346377 A338757 A080733 * A301295 A215036 A294448
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 30 21:43 EDT 2023. Contains 365799 sequences. (Running on oeis4.)