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”).
%I #34 Dec 18 2021 11:20:37
%S 0,-1,1,-1,7,5,13,11,11,25,19,29,37,35,35,41,55,49,59,67,61,71,71,73,
%T 89,97,95,103,101,85,119,119,133,119,145,139,145,155,155,161,175,161,
%U 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
%N a(n) = 3*prime(n) - 2*prime(n+1).
%C 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
%H Harvey P. Dale, <a href="/A107471/b107471.txt">Table of n, a(n) for n = 1..1000</a>
%H Jitsuro Nagura, <a href="http://projecteuclid.org/euclid.pja/1195570997">On the interval containing at least one prime number</a>, Proc. Japan Acad., 28 (1952), 177-181.
%e a(5)=7 because prime(5)=11, prime(6)=13 and 3*11 - 2*13 = 7.
%p a:=n->3*ithprime(n)-2*ithprime(n+1): seq(a(n),n=1..80); # _Emeric Deutsch_, May 28 2005
%t 3#[[1]]-2#[[2]]&/@Partition[Prime[Range[80]],2,1] (* _Harvey P. Dale_, Apr 17 2017 *)
%o (PARI) a(n) = my(p=prime(n)); 3*p - 2*nextprime(p+1); \\ _Michel Marcus_, Nov 17 2021
%Y Cf. A000040.
%K sign
%O 1,5
%A _Leroy Quet_, May 27 2005
%E More terms from _Emeric Deutsch_, May 28 2005