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!)
A256468 Number of primes between prime(n)^2 and prime(n)*prime(n+1). 6

%I #16 Mar 30 2015 21:41:36

%S 1,2,2,6,4,8,5,12,22,8,27,21,11,23,38,36,16,43,31,15,52,36,52,75,45,

%T 22,42,19,48,160,47,81,22,141,26,90,89,65,102,96,40,180,40,73,38,227,

%U 227,85,44,85,129,43,216,133,140,137,45,147,105,46,260,354,115,52,108,386,165,283,64

%N Number of primes between prime(n)^2 and prime(n)*prime(n+1).

%H Antti Karttunen, <a href="/A256468/b256468.txt">Table of n, a(n) for n = 1..6542</a>

%H A. Karttunen, <a href="https://oeis.org/plot2a?name1=A256468&amp;name2=A256469&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=ratio&amp;drawlines=true">Ratio a(n)/A256469(n) plotted with OEIS Plot2-script</a>

%H A. Karttunen, <a href="https://oeis.org/plot2a?name1=A256468&amp;name2=A050216&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=ratio&amp;drawlines=true">Ratio a(n)/A050216(n) plotted with OEIS Plot2-script</a>

%F a(n) = A256447(n)-1.

%F a(n) = A050216(n) - A256469(n).

%F a(n) = A256469(n) - A256470(n).

%t Table[Abs@ Subtract[PrimePi[Prime[n]^2], PrimePi[Prime[n] Prime[n + 1]]], {n, 69}] (* _Michael De Vlieger_, Mar 30 2015 *)

%o (PARI)

%o allocatemem(234567890);

%o default(primelimit,4294965247);

%o A256468(n) = (primepi(prime(n)*prime(n+1)) - primepi(prime(n)^2));

%o for(n=1, 6542, write("b256468.txt", n, " ", A256468(n)));

%o (Scheme) (define (A256468 n) (let* ((p (A000040 n)) (p2 (* p p))) (let loop ((s 0) (k (* p (A000040 (+ 1 n))))) (cond ((= k p2) s) (else (loop (+ s (if (prime? k) 1 0)) (- k 1)))))))

%Y One less than A256447.

%Y Cf. A050216, A256469, A256470.

%K nonn

%O 1,2

%A _Antti Karttunen_, Mar 30 2015

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 23 19:56 EDT 2024. Contains 371916 sequences. (Running on oeis4.)