cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A256468 #18 Mar 31 2025 17:02:23
%S A256468 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 A256468 22,42,19,48,160,47,81,22,141,26,90,89,65,102,96,40,180,40,73,38,227,
%U A256468 227,85,44,85,129,43,216,133,140,137,45,147,105,46,260,354,115,52,108,386,165,283,64
%N A256468 Number of primes between prime(n)^2 and prime(n)*prime(n+1).
%H A256468 Antti Karttunen, <a href="/A256468/b256468.txt">Table of n, a(n) for n = 1..6542</a>
%H A256468 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 A256468 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 A256468 a(n) = A256447(n)-1.
%F A256468 a(n) = A050216(n) - A256469(n).
%F A256468 a(n) = A256469(n) - A256470(n).
%t A256468 Table[Abs@ Subtract[PrimePi[Prime[n]^2], PrimePi[Prime[n] Prime[n + 1]]], {n, 69}] (* _Michael De Vlieger_, Mar 30 2015 *)
%t A256468 PrimePi[Times@@#]-PrimePi[#[[1]]^2]&/@Partition[Prime[Range[70]],2,1] (* _Harvey P. Dale_, Mar 31 2025 *)
%o A256468 (PARI)
%o A256468 allocatemem(234567890);
%o A256468 default(primelimit,4294965247);
%o A256468 A256468(n) = (primepi(prime(n)*prime(n+1)) - primepi(prime(n)^2));
%o A256468 for(n=1, 6542, write("b256468.txt", n, " ", A256468(n)));
%o A256468 (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 A256468 One less than A256447.
%Y A256468 Cf. A050216, A256469, A256470.
%K A256468 nonn
%O A256468 1,2
%A A256468 _Antti Karttunen_, Mar 30 2015