Original entry on oeis.org
89, 113, 139, 181, 199, 211, 241, 283, 293, 317, 337, 359, 389, 401, 409, 421, 449, 467, 479, 491, 509, 523, 547, 577, 619, 631, 661, 683, 691, 701, 709, 719, 743, 761, 773, 787, 797, 811, 829, 839, 863, 887, 911, 919, 929, 953, 983, 997, 1021, 1039, 1051, 1069, 1109
Offset: 1
A124590
Primes p such that q-p <= 6, where q is the next prime after p.
Original entry on oeis.org
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 109, 127, 131, 137, 149, 151, 157, 163, 167, 173, 179, 191, 193, 197, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 307, 311, 313, 331, 347, 349, 353, 367
Offset: 1
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- D. A. Goldston, S. W. Graham, J. Pintz, C. Y. Yilidirm, Small gaps between primes or almost primes (2005)
- K. Soundararajan, Small gaps between prime numbers: the work of Goldston-Pintz-Yildirim, Bull. Amer. Math. Soc. 44 (2007), pp. 1-18.
- Index entries for primes, gaps between
-
v=List([2]);p=3;forprime(q=5,1e3,if(q-p<=6,listput(v,p));p=q);Vec(v) \\ Charles R Greathouse IV, Jul 31 2013
-
list(lim)=my(v=List(),p=2); forprime(q=3,nextprime(lim\1+1), if(q-p<7, listput(v,p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jan 31 2017
A106628
Anomalous prime numbers.
Original entry on oeis.org
199, 211, 283, 317, 337, 389, 491, 509, 547, 577, 619, 683, 701, 773, 787, 797, 863, 887, 1069, 1109, 1129, 1153, 1163, 1373, 1381, 1409, 1459, 1523, 1531, 1571, 1627, 1637, 1669, 1709, 1723, 1733, 1759, 1831, 1889, 1913, 1933, 1951, 1979, 2003, 2017
Offset: 1
a(1) = 199 because -88*199+83*211 = 1, |-88+83| = 5 > 1;
|tx+dy| = 1 for all primes x < 199 (when t and d are determined by the algorithm "Anomalia")
-
q[x_]:=Module[{y,d},If[!PrimeQ[x],Return[0]];y=NextPrime[x + 1];d=y-x;Mod[y-1, d]!=0 && Mod[y+1, d] != 0];Select[Range[2017],q] (* James C. McMahon, Aug 23 2025 *)
-
is(x)=if(!isprime(x), return(0)); my(y=nextprime(x+1),d=y-x); (y-1)%d && (y+1)%d \\ Charles R Greathouse IV, Aug 20 2017
A167776
Composite numbers having six composite nearest-neighbors.
Original entry on oeis.org
93, 117, 118, 119, 120, 121, 122, 123, 143, 144, 145, 185, 186, 187, 203, 204, 205, 206, 207, 215, 216, 217, 218, 219, 245, 246, 247, 287, 288, 289, 297, 298, 299, 300, 301, 302, 303, 321, 322, 323, 324, 325, 326, 327, 341, 342, 343, 363, 393, 405, 413, 414
Offset: 1
a(1)=117 (114,115,116,118,119,120 are composite nearest-neighbors);
a(2)=118 (115,116,117,119,120,121 are composite nearest-neighbors).
There are no primes between primes 241 and 251 which gives a gap of 10 between them. Therefore, all numbers between (inclusive) 241 + 4 and 251 - 4 are terms. - _David A. Corneth_, Jun 24 2016
-
Select[Range[6!],!PrimeQ[#] && !PrimeQ[#-1] && !PrimeQ[#+1] && !PrimeQ[#-2] && !PrimeQ[#+2] && !PrimeQ[#-3] && !PrimeQ[#+3]&] (* Vladimir Joseph Stephan Orlovsky, Dec 26 2010 *)
Select[Range@ 414, Times @@ Boole@ Map[CompositeQ, Range[# - 3, # + 3]] == 1 &] (* Michael De Vlieger, Jun 24 2016 *)
-
lista(n) = {forprime(i=2,n+3,g=nextprime(i+1)-i;
for(j=i+4,i+g-4,print1(j", ")))}
a(n) = {forprime(i=88,,g=nextprime(i+1)-i;n-=max(0,g-7);
if(n<=0,return(i+g-4+n)))}
\\ gives the next term larger than n, whether n is a term or not.
nxt(n) = my(p=nextprime(n),g=0); if(p-n>4, n+1, while(1, q=nextprime(p+1); g=q-p; if(g>7, return(p+4), p=q))) \\ David A. Corneth, Jun 24 2016
Corrected (93, 144, 145 inserted) by
R. J. Mathar, May 30 2010
A382766
Odd primes p such that p + 4, p + 6 and p + 8 are composite.
Original entry on oeis.org
113, 137, 139, 179, 181, 197, 199, 211, 239, 241, 281, 283, 293, 317, 337, 409, 419, 421, 467, 509, 521, 523, 547, 577, 617, 619, 631, 659, 661, 691, 709, 773, 787, 797, 809, 811, 827, 829, 839, 863, 887, 919, 953, 997, 1019, 1021, 1039, 1049, 1051, 1069
Offset: 1
-
P:= select(isprime,{seq(i,i=3..10008,2)}):
R:= P minus (P -~ 4) minus (P -~ 6) minus (P -~ 8):
sort(convert(R,list)); # Robert Israel, Apr 28 2025
-
Select[Table[
Module[{p = 2, q},
While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
p = NextPrime[p]]; If[p == 11, q, Nothing]], {n, 2, 1000}], # =!=
Nothing &]
-
isok(p) = (p%2) && isprime(p) && !isprime(p+4) && !isprime(p+6) && !isprime(p+8); \\ Michel Marcus, Apr 07 2025
A297709
Table read by antidiagonals: Let b be the number of digits in the binary expansion of n. Then T(n,k) is the k-th odd prime p such that the binary digits of n match the primality of the b consecutive odd numbers beginning with p (or 0 if no such k-th prime exists).
Original entry on oeis.org
3, 5, 7, 7, 13, 3, 11, 19, 5, 23, 13, 23, 11, 31, 7, 17, 31, 17, 47, 13, 5, 19, 37, 29, 53, 19, 11, 3, 23, 43, 41, 61, 37, 17, 0, 89, 29, 47, 59, 73, 43, 29, 0, 113, 23, 31, 53, 71, 83, 67, 41, 0, 139, 31, 19, 37, 61, 101, 89, 79, 59, 0, 181, 47, 43, 7, 41, 67
Offset: 1
13 = 1101_2, so row n=13 lists the odd primes p such that the four consecutive odd numbers p, p+2, p+4, and p+6 are prime, prime, composite, and prime, respectively; these are the terms of A022004.
14 = 1110_2, so row n=14 lists the odd primes p such that p, p+2, p+4, and p+6 are prime, prime, prime, and composite, respectively; since there is only one such prime (namely, 3), there is no such 2nd, 3rd, 4th, etc. prime, so the terms in row 14 are {3, 0, 0, 0, ...}.
15 = 1111_2, so row n=15 would list the odd primes p such that p, p+2, p+4, and p+6 are all prime, but since no such prime exists, every term in row 15 is 0.
Table begins:
n in base| k | OEIS
---------+----------------------------------------+sequence
10 2 | 1 2 3 4 5 6 7 8 | number
=========+========================================+========
1 1 | 3 5 7 11 13 17 19 23 | A065091
2 10 | 7 13 19 23 31 37 43 47 | A049591
3 11 | 3 5 11 17 29 41 59 71 | A001359
4 100 | 23 31 47 53 61 73 83 89 | A124582
5 101 | 7 13 19 37 43 67 79 97 | A029710
6 110 | 5 11 17 29 41 59 71 101 | A001359*
7 111 | 3 0 0 0 0 0 0 0 |
8 1000 | 89 113 139 181 199 211 241 283 | A083371
9 1001 | 23 31 47 53 61 73 83 131 | A031924
10 1010 | 19 43 79 109 127 163 229 313 |
11 1011 | 7 13 37 67 97 103 193 223 | A022005
12 1100 | 29 59 71 137 149 179 197 239 | A210360*
13 1101 | 5 11 17 41 101 107 191 227 | A022004
14 1110 | 3 0 0 0 0 0 0 0 |
15 1111 | 0 0 0 0 0 0 0 0 |
16 10000 | 113 139 181 199 211 241 283 293 | A124584
17 10001 | 89 359 389 401 449 479 491 683 | A031926
18 10010 | 31 47 61 73 83 151 157 167 |
19 10011 | 23 53 131 173 233 263 563 593 | A049438
20 10100 | 19 43 79 109 127 163 229 313 |
21 10101 | 0 0 0 0 0 0 0 0 |
22 10110 | 7 13 37 67 97 103 193 223 | A022005
23 10111 | 0 0 0 0 0 0 0 0 |
24 11000 | 137 179 197 239 281 419 521 617 |
25 11001 | 29 59 71 149 269 431 569 599 | A049437*
26 11010 | 17 41 107 227 311 347 461 641 |
27 11011 | 5 11 101 191 821 1481 1871 2081 | A007530
28 11100 | 0 0 0 0 0 0 0 0 |
29 11101 | 3 0 0 0 0 0 0 0 |
30 11110 | 0 0 0 0 0 0 0 0 |
31 11111 | 0 0 0 0 0 0 0 0 |
*other than the referenced sequence's initial term 3
.
Alternative version of table:
.
n in base|primal-| k | OEIS
---------+ ity +------------------------------+ seq.
10 2 |pattern| 1 2 3 4 5 6 | number
=========+=======+==============================+========
1 1 | p | 3 5 7 11 13 17 | A065091
2 10 | pc | 7 13 19 23 31 37 | A049591
3 11 | pp | 3 5 11 17 29 41 | A001359
4 100 | pcc | 23 31 47 53 61 73 | A124582
5 101 | pcp | 7 13 19 37 43 67 | A029710
6 110 | ppc | 5 11 17 29 41 59 | A001359*
7 111 | ppp | 3 0 0 0 0 0 |
8 1000 | pccc | 89 113 139 181 199 211 | A083371
9 1001 | pccp | 23 31 47 53 61 73 | A031924
10 1010 | pcpc | 19 43 79 109 127 163 |
11 1011 | pcpp | 7 13 37 67 97 103 | A022005
12 1100 | ppcc | 29 59 71 137 149 179 | A210360*
13 1101 | ppcp | 5 11 17 41 101 107 | A022004
14 1110 | pppc | 3 0 0 0 0 0 |
15 1111 | pppp | 0 0 0 0 0 0 |
16 10000 | pcccc | 113 139 181 199 211 241 | A124584
17 10001 | pcccp | 89 359 389 401 449 479 | A031926
18 10010 | pccpc | 31 47 61 73 83 151 |
19 10011 | pccpp | 23 53 131 173 233 263 | A049438
20 10100 | pcpcc | 19 43 79 109 127 163 |
21 10101 | pcpcp | 0 0 0 0 0 0 |
22 10110 | pcppc | 7 13 37 67 97 103 | A022005
23 10111 | pcppp | 0 0 0 0 0 0 |
24 11000 | ppccc | 137 179 197 239 281 419 |
25 11001 | ppccp | 29 59 71 149 269 431 | A049437*
26 11010 | ppcpc | 17 41 107 227 311 347 |
27 11011 | ppcpp | 5 11 101 191 821 1481 | A007530
28 11100 | pppcc | 0 0 0 0 0 0 |
29 11101 | pppcp | 3 0 0 0 0 0 |
30 11110 | ppppc | 0 0 0 0 0 0 |
31 11111 | ppppp | 0 0 0 0 0 0 |
.
*other than the referenced sequence's initial term 3
Cf.
A001359,
A007530,
A022004,
A022005,
A029710,
A031924,
A031926,
A049437,
A049438,
A049591,
A065091,
A124582,
A083371,
A124584,
A210360.
Showing 1-6 of 6 results.
Comments