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!)
A033558 a(n) = 2n - {smallest prime > n}. 1
0, 1, 1, 3, 3, 5, 3, 5, 7, 9, 9, 11, 9, 11, 13, 15, 15, 17, 15, 17, 19, 21, 17, 19, 21, 23, 25, 27, 27, 29, 25, 27, 29, 31, 33, 35, 33, 35, 37, 39, 39, 41, 39, 41, 43, 45, 41, 43, 45, 47, 49, 51, 47, 49, 51, 53, 55, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
By Bertrand's postulate, for n>3 a(n)>2. - Zak Seidov, Mar 06 2015
LINKS
MAPLE
f := n->2*n-nextprime(n); [ seq(f(i), i=1..60) ];
MATHEMATICA
Table[2*n-NextPrime[n], {n, 60}] (* Harvey P. Dale, Jul 23 2018 *)
PROG
(PARI) vector(60, n, 2*n - nextprime(n + 1)) \\ Zak Seidov, Mar 06 2015
CROSSREFS
Cf. A151800 (least prime > n).
Sequence in context: A078587 A335074 A239931 * A046217 A057662 A015971
KEYWORD
nonn
AUTHOR
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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)