|
| |
|
|
A007920
|
|
Smallest number k such that n+k is prime.
|
|
8
| |
|
|
2, 1, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 1, 0, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 1, 0, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 1, 0, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 1
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,1
|
|
|
COMMENTS
| Smarandache complementary prime function.
a(n) = A007918(n) - n.
|
|
|
REFERENCES
| M. Popescu, V. Seleacu, About the Smarandache Complementary Prime Function, Smarandache Notions Journal, Vol. 7, No. 1-2-3, 1996, 12-22.
F. Smarandache, "Only Problems, not Solutions!", Xiquan Publ., Phoenix-Chicago, 1993
|
|
|
LINKS
| T. D. Noe, Table of n, a(n) for n=0..10000
M. L. Perez et al., eds., Smarandache Notions Journal
F. Smarandache, Only Problems, Not Solutions!.
|
|
|
EXAMPLE
| a(1)=1 because 1+1=2=prime
|
|
|
MATHEMATICA
| snk[n_]:=If[PrimeQ[n], 0, NextPrime[n]-n]; Array[snk, 110, 0] (* From Harvey P. Dale, Sep 19 2011 *)
|
|
|
PROG
| (PARI) a(n)=nextprime(n)-n
|
|
|
CROSSREFS
| Cf. A064722.
Sequence in context: A140728 A130068 A051699 * A127587 A175832 A082926
Adjacent sequences: A007917 A007918 A007919 * A007921 A007922 A007923
|
|
|
KEYWORD
| nonn,easy,nice
|
|
|
AUTHOR
| R. Muller
|
|
|
EXTENSIONS
| More terms from Joanna S. Bartlett (s1117611(AT)cedarville.edu)
|
| |
|
|