OFFSET
1,4
COMMENTS
By Bertrand's postulate, for n>3 a(n)>2. - Zak Seidov, Mar 06 2015
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
Wikipedia, Bertrand's postulate
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
KEYWORD
nonn
AUTHOR
STATUS
approved