OFFSET
1,2
COMMENTS
Are there any missing terms? The first 10^7 primes were examined. All these differences occur for some k < 10^5. Note that the first differences of these terms is 1, 2, 4, or 6.
From R. J. Mathar, Oct 29 2013: (Start)
This sequence of possible differences d= prime(k)^2 -q looks similar to A047238; 1 is an exception associated with the single even prime, 1=2^2-3.
[Reason: Otherwise primes are odd, squared primes are also odd, so the differences are even and therefore in the class {0,2,4} mod 6.
Furthermore primes are of the form 3n+1 or 3n+2, squared primes are of the form 9n^2+6n+1 or 9n^2+12n+4, so squared primes are of the form ==1 (mod 3).
The difference prime(k)^2-q is therefore the difference between a number ==1 (mod 3) and a number == {1,2} (mod 3) and therefore a number == {0,2} mod 3. This is never of the form 6n+4 ( == 1 mod 3). So the differences are in the class {0,2} mod 6, demonstrating that this is essentially a subsequence of A047238.]
Furthermore, differences 36, 144, 324,... of the form (6n)^2, A016910, appear in A047238 but not here, because prime(k)^2 -q=(6n)^2 is equivalent to prime(k)^2-(6n)^2 =q =(prime(k)+6n)*(prime(k)-6n), which requires an explicit factorization of the prime q. This is a contradiction if we assure that prime(k)-6n is not equal 1; if we scanned explicitly all primes up to prime(k)=10^7, for example, all (6n)^2 up to 6n<=10^7 are proved not to be in the sequence. (End)
MATHEMATICA
t = Table[p2 = Prime[k]^2; p2 - NextPrime[p2, -1], {k, 100000}]; Take[Union[t], 60]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 21 2013
STATUS
approved