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.

A173897 a(n) is the number of Sophie Germain primes (A005384) between prime(n)^2 and prime(n+1)^2.

This page as a plain text file.
%I A173897 #27 Apr 28 2020 18:12:15
%S A173897 1,2,2,4,1,7,2,5,9,2,8,9,2,10,12,12,4,16,7,6,14,11,19,16,10,6,11,9,11,
%T A173897 49,11,18,6,43,10,21,18,15,25,21,7,43,11,19,12,53,55,18,9,20,35,9,50,
%U A173897 31,32,28,4,38,23,15,65,74,17,12,27,90,38,63,13,29,38,51,46,39,27,38,47,28
%N A173897 a(n) is the number of Sophie Germain primes (A005384) between prime(n)^2 and prime(n+1)^2.
%C A173897 If you graph a(n) versus n, an interesting pattern emerges. As you go farther along the n-axis, greater are the number of Sophie Germain primes, on average, within each interval obtained. The smallest count of 1 occurs twice: between squares of (2,3) and (11,13). I suspect the number of Sophie Germain primes within each interval will never be zero. If one could prove that there is at least 1 Sophie Germain prime within each interval, this would imply that Sophie Germain primes are infinite.
%H A173897 J. S. Cheema, <a href="/A173897/b173897.txt">Table of n, a(n) for n = 1..10000</a>
%H A173897 Wikipedia, <a href="http://en.wikipedia.org/wiki/Sophie_Germain_prime">Sophie Germain Primes</a>
%e A173897 For n = 1, we consider the interval [2^2, 3^2], within which is one Sophie Germain prime, 5. Thus a(1) = 1.
%o A173897 (Sage) A173897 = lambda n: len([p for p in prime_range(nth_prime(n)**2, nth_prime(n+1)**2) if is_prime(2*p+1)]) # _D. S. McNeil_, Dec 02 2010
%o A173897 (PARI) is_a005384(n) = ispseudoprime(2*n+1)
%o A173897 a(n) = my(i=0); forprime(q=prime(n)^2, prime(n+1)^2, if(is_a005384(q) && q < prime(n+1)^2, i++)); i \\ _Felix Fröhlich_, Sep 04 2016
%Y A173897 Cf. A005384.
%Y A173897 Cf. A069482 (prime(n+1)^2 - prime(n)^2). - _Zak Seidov_, Sep 04 2016
%K A173897 nonn
%O A173897 1,2
%A A173897 _Jaspal Singh Cheema_, Mar 01 2010
%E A173897 Edited by _D. S. McNeil_, Dec 02 2010