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!)
A120941 a(n)=k-n where prime(k) is the smallest prime greater than prime(n)*prime(n+1). 2

%I #22 May 09 2021 04:58:04

%S 3,5,9,18,30,42,60,77,113,145,179,229,262,293,353,430,487,545,622,671,

%T 737,826,916,1052,1184,1249,1310,1373,1443,1654,1894,2026,2131,2298,

%U 2481,2602,2782,2943,3107,3298,3436,3651,3866,3975,4083,4346,4808,5144

%N a(n)=k-n where prime(k) is the smallest prime greater than prime(n)*prime(n+1).

%C Parity of A120941: 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, ....

%H Robert Israel, <a href="/A120941/b120941.txt">Table of n, a(n) for n = 1..4000</a>

%F a(n) = A000720(A006094(n)) + 1 - n. - _Robert Israel_, Mar 21 2017

%e The product of the 4th prime number, 7 and the 5th prime, 11, is 77; the smallest prime greater than this is the 22nd prime, 79; therefore the 4th term of the sequence is 22-4 = 18.

%p f:= n -> numtheory:-pi(ithprime(n)*ithprime(n+1))+1-n:

%p map(f, [$1..100]); # _Robert Israel_, Mar 21 2017

%t Table[PrimePi[Prime[n]Prime[n + 1]] - n + 1, {n, 48}] (* _Zak Seidov_, Aug 21 2006 *)

%o (PARI) for(n=1, 100, print1(primepi(prime(n)*prime(n + 1)) - n + 1, ", ")) \\ _Indranil Ghosh_, Mar 22 2017

%o (Python)

%o from sympy import prime, primepi

%o print([primepi(prime(n)*prime(n + 1)) - n + 1 for n in range(1, 100)]) # _Indranil Ghosh_, Mar 22 2017

%Y Cf. A000720, A006094, A074928.

%K nonn

%O 1,1

%A _Axel Harvey_, Aug 18 2006

%E More terms from _Robert G. Wilson v_, Aug 21 2006

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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)