A007921 Numbers that are not the difference of two primes.
7, 13, 19, 23, 25, 31, 33, 37, 43, 47, 49, 53, 55, 61, 63, 67, 73, 75, 79, 83, 85, 89, 91, 93, 97, 103, 109, 113, 115, 117, 119, 121, 123, 127, 131, 133, 139, 141, 143, 145, 151, 153, 157, 159, 163, 167, 169, 173, 175, 181, 183, 185, 187, 193
Offset: 1
References
- F. Smarandache, Properties of Numbers, 1972. (See Smarandache odd sieve.)
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Diophante, A1880. NP en PA (prime numbers in arithmetic progression) (in French).
- C. Dumitrescu and V. Seleacu, editors, Some Notions and Questions in Number Theory, Vol. I.
- F. Smarandache, Only Problems, Not Solutions!, 4th ed., 1993, Problem 94.
- Wikipedia, Primes in arithmetic progression.
- Index entries for sequences related to primes in arithmetic progressions.
- Index entries for primes, gaps between.
Crossrefs
Cf. A048859.
Programs
-
Haskell
a007921 n = a007921_list !! (n-1) a007921_list = filter ((== 0) . a010051' . (+ 2)) [1, 3 ..] -- Reinhard Zumkeller, Jul 03 2015
-
Maple
filter := d -> irem(d, 2) <> 0 and not isprime(2+d) : select(filter, [`$`(1 .. 200)]); # Bernard Schott, Jan 08 2023
-
Mathematica
Lim=200;nn=10;seq:=Complement[Range[Lim],Union[Flatten[Differences/@Subsets[Prime[Range[nn]],{2}]]]];Until[AllTrue[seq,OddQ],nn++];seq (* James C. McMahon, May 04 2024 *)
-
PARI
is(n)=n%2 && !isprime(n+2) \\ On Polignac's conjecture; Charles R Greathouse IV, Jun 28 2013
-
Python
from sympy import isprime print([n for n in range(1, 200) if n%2 and not isprime(n + 2)]) # Indranil Ghosh, Jun 15 2017, after Charles R Greathouse IV
Comments