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!)
A087030 n "reflected" in the next prime: a(n)=2p-n, p is smallest prime > n. 3
3, 4, 7, 6, 9, 8, 15, 14, 13, 12, 15, 14, 21, 20, 19, 18, 21, 20, 27, 26, 25, 24, 35, 34, 33, 32, 31, 30, 33, 32, 43, 42, 41, 40, 39, 38, 45, 44, 43, 42, 45, 44, 51, 50, 49, 48, 59, 58, 57, 56, 55, 54, 65, 64, 63, 62, 61, 60, 63, 62, 73, 72, 71, 70, 69, 68, 75, 74, 73, 72, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Take any n, find the distance from n to p: d=p-n, where p is the smallest prime > n ("next prime"), then a(n) is the number which is at the same distance from p as n, a(n)=p+d. n such that p+d=2p-n is prime in A087031.
LINKS
FORMULA
a(n)=2p-n, p is the smallest prime > n.
EXAMPLE
a(2)=4 because smallest prime >2 is 3 and 2*3-2=4.
MATHEMATICA
Table[2NextPrime[n]-n, {n, 80}] (* Harvey P. Dale, Jun 29 2011 *)
PROG
(PARI) a(n)=2*nextprime(n+1)-n \\ Charles R Greathouse IV, Oct 03 2013
CROSSREFS
Cf. A087031.
Sequence in context: A341944 A332994 A086469 * A175187 A332993 A126253
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Jul 31 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 April 23 10:13 EDT 2024. Contains 371905 sequences. (Running on oeis4.)