login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A107471
a(n) = 3*prime(n) - 2*prime(n+1).
1
0, -1, 1, -1, 7, 5, 13, 11, 11, 25, 19, 29, 37, 35, 35, 41, 55, 49, 59, 67, 61, 71, 71, 73, 89, 97, 95, 103, 101, 85, 119, 119, 133, 119, 145, 139, 145, 155, 155, 161, 175, 161, 187, 185, 193, 175, 187, 215, 223, 221, 221, 235, 221, 239, 245, 251, 265, 259, 269, 277, 263, 265, 299, 307, 305, 289, 319, 317, 343, 341, 341
OFFSET
1,5
COMMENTS
a(n) > 0 for n >= 5. For 5 <= n <= 24 can be shown by observation. For n > 24, Jitsuro Nagura proved that for some integer k, there is always a prime between k and (6/5)*k. Therefore 3*prime(n) - 2*prime(n+1) >= (3/5)*prime(n) > 0. - Ryan Bresler, Nov 17 2021
LINKS
Jitsuro Nagura, On the interval containing at least one prime number, Proc. Japan Acad., 28 (1952), 177-181.
EXAMPLE
a(5)=7 because prime(5)=11, prime(6)=13 and 3*11 - 2*13 = 7.
MAPLE
a:=n->3*ithprime(n)-2*ithprime(n+1): seq(a(n), n=1..80); # Emeric Deutsch, May 28 2005
MATHEMATICA
3#[[1]]-2#[[2]]&/@Partition[Prime[Range[80]], 2, 1] (* Harvey P. Dale, Apr 17 2017 *)
PROG
(PARI) a(n) = my(p=prime(n)); 3*p - 2*nextprime(p+1); \\ Michel Marcus, Nov 17 2021
CROSSREFS
Cf. A000040.
Sequence in context: A369797 A070408 A176672 * A332768 A107323 A265794
KEYWORD
sign
AUTHOR
Leroy Quet, May 27 2005
EXTENSIONS
More terms from Emeric Deutsch, May 28 2005
STATUS
approved