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.

A192454 Number of primes in the range [2^n-n, 2^n+n].

This page as a plain text file.
%I A192454 #28 Nov 14 2014 08:36:57
%S A192454 0,2,3,3,3,3,3,2,3,3,4,2,3,2,1,3,5,3,6,2,5,4,3,5,2,0,2,0,2,2,5,3,3,4,
%T A192454 1,1,4,4,2,4,2,3,4,2,4,0,2,3,1,0,2,1,3,2,2,4,3,5,2,1,1,6,1,2,4,1,3,7,
%U A192454 4,2,3,2,1,2,5,3,4,6,3,3,2,4,5,2,5,2,7,3,1,7,4,3,2,3,2,4,5,0,5,0,2
%N A192454 Number of primes in the range [2^n-n, 2^n+n].
%H A192454 Alois P. Heinz, <a href="/A192454/b192454.txt">Table of n, a(n) for n = 0..1000</a>
%e A192454 a(1) = 2 because two primes in the range [1^2-1, 1^2+1], a(2) = 3 because 2, 3 and 5 are in range [2^2-2, 2^2+2].
%p A192454 with(numtheory); f:=n->pi(2^n+n)-pi(2^n-n-1); [seq(f(n),n=0..20)];
%p A192454 # second Maple program:
%p A192454 a:= n-> add(`if`(isprime(t), 1, 0), t=2^n-n..2^n+n):
%p A192454 seq(a(n), n=0..100);  # _Alois P. Heinz_, Sep 13 2011
%t A192454 Table[PrimePi[2^n + n] - PrimePi[2^n - n - 1], {n, 0, 40}]
%Y A192454 Cf. A000290, A192931.
%K A192454 nonn
%O A192454 0,2
%A A192454 _Juri-Stepan Gerasimov_, Jul 01 2011
%E A192454 Corrected with Maple program. - _N. J. A. Sloane_, Jul 11 2011
%E A192454 Corrected name and added terms up to a(40). - _T. D. Noe_, Jul 12 2011
%E A192454 More terms from _Alois P. Heinz_, Sep 13 2011