A078850
Initial term in sequence of four consecutive primes separated by 3 consecutive differences each <=6 (i.e., when d=2,4 or 6) and forming d-pattern=[4,2,6]; short d-string notation of pattern = [426].
Original entry on oeis.org
67, 1447, 2377, 2707, 5437, 5737, 7207, 9337, 11827, 12037, 19207, 21487, 21517, 23197, 26107, 26947, 28657, 31147, 31177, 35797, 37357, 37567, 42697, 50587, 52177, 65167, 67927, 69997, 71707, 74197, 79147, 81547, 103087, 103387, 106657
Offset: 1
p=67,67+4=71,67+4+2=73,67+4+2+6=79 are consecutive primes.
Cf. analogous prime quadruple sequences with various possible {2, 4, 6}-difference-patterns in brackets:
A007530[242],
A078847[246],
A078848[264],
A078849[266],
A052378[424],
A078850[426],
A078851[462],
A078852[466],
A078853[624],
A078854[626],
A078855[642],
A078856[646],
A078857[662],
A078858[664],
A033451[666].
-
d = {4, 2, 6}; First /@ Select[Partition[Prime@ Range@ 12000, Length@ d + 1, 1], Differences@ # == d &] (* Michael De Vlieger, May 02 2016 *)
A079016
Suppose p and q = p+12 are primes. Define the difference pattern of (p,q) to be the successive differences of the primes in the range p to q. There are 14 possible difference patterns, namely [12], [2,10], [4,8], [6,6], [8,4], [10,2], [2,4,6], [2,6,4], [4,2,6], [4,6,2], [6,2,4], [6,4,2], [2,4,2,4] and [4,2,4,2]. Sequence gives smallest value of p for each difference pattern, sorted by magnitude.
Original entry on oeis.org
5, 7, 17, 19, 29, 31, 47, 67, 89, 137, 139, 199, 397, 1601
Offset: 1
p=1601, q=1613 has difference pattern [6,2,4] and {1601,1607,1609,1613} is the corresponding consecutive prime 4-tuple.
A022006(1)=5,
A022007(1)=7,
A078847(1)=17,
A078851(1)=19,
A078848(1)=29,
A078855(1)=31,
A047948(1)=47,
A078850(1)=67,
A031930(1)=
A000230(6)=199,
A046137(1)=7,
A078853(1)=1601.
-
Function[s, Function[t, Union@ Flatten@ Map[s[[First@ Position[t, #]]] &, {{12}, {2, 10}, {4, 8}, {6, 6}, {8, 4}, {10, 2}, {2, 4, 6}, {2, 6, 4}, {4, 2, 6}, {4, 6, 2}, {6, 2, 4}, {6, 4, 2}, {2, 4, 2, 4}, {4, 2, 4, 2}}]]@ Map[Differences@ Select[Range[#, # + 12], PrimeQ] &, s]]@ Select[Prime@ Range[10^3], PrimeQ[# + 12] &] (* Michael De Vlieger, Feb 25 2017 *)
A078961
Primes p such that the differences between the 5 consecutive primes starting with p are (6,4,2,4).
Original entry on oeis.org
31, 1291, 1861, 1987, 2677, 4507, 5641, 7867, 13681, 17377, 24097, 35521, 42451, 44257, 55807, 80671, 88651, 88801, 93481, 110557, 113011, 113161, 118891, 134581, 155371, 163981, 198817, 221707, 234181, 266671, 269377, 284731, 290611, 313981, 331537, 332461, 344161
Offset: 1
31 is a term since 31, 37 = 31 + 6, 41 = 31 + 10, 43 = 31 + 12 and 47 = 31 + 16 are consecutive primes.
-
Transpose[Select[Partition[Prime[Range[26000]],5,1],Differences[#]=={6,4,2,4}&]][[1]] (* Harvey P. Dale, Aug 26 2014 *)
-
list(lim) = {my(p1 = 2, p2 = 3, p3 = 5, p4 = 7); forprime(p5 = 11, lim, if(p2 - p1 == 6 && p3 - p2 == 4 && p4 - p3 == 2 && p5 - p4 == 4, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4; p4 = p5);} \\ Amiram Eldar, Feb 22 2025
A078962
Primes p such that the differences between the 5 consecutive primes starting with p are (6,4,2,6).
Original entry on oeis.org
61, 2371, 5431, 11821, 21481, 37561, 50581, 69991, 124291, 126481, 139291, 223831, 230761, 268771, 272341, 275911, 305401, 363361, 365461, 388471, 498391, 516151, 556261, 561091, 585031, 752281, 776551, 783781, 812341, 832621, 911161, 942031, 950221, 1030021, 1108561
Offset: 1
61 is in the sequence since 61, 67 = 61 + 6, 71 = 61 + 10, 73 = 61 + 12 and 79 = 61 + 18 are consecutive primes.
-
Select[Partition[Prime[Range[50000]], 5, 1], Differences[#] == {6,4,2,6} &][[;;, 1]] (* Amiram Eldar, Feb 22 2025 *)
-
list(lim) = {my(p1 = 2, p2 = 3, p3 = 5, p4 = 7); forprime(p5 = 11, lim, if(p2 - p1 == 6 && p3 - p2 == 4 && p4 - p3 == 2 && p5 - p4 == 6, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4; p4 = p5);} \\ Amiram Eldar, Feb 22 2025
A290635
Greatest of 4 consecutive primes with consecutive gaps 6, 4, 2.
Original entry on oeis.org
43, 73, 283, 619, 1303, 1669, 1789, 1873, 1999, 2143, 2383, 2689, 2803, 4519, 5419, 5443, 5653, 7879, 9013, 11833, 13693, 14563, 17389, 18133, 18313, 20359, 21493, 22159, 24109, 27283, 32719, 35533, 36793, 37573, 41233, 41959, 42409, 42463, 44269, 47149, 50593, 55219, 55819, 55933
Offset: 1
43 is a member of the sequence because 43 is the greatest of the 4 consecutive primes 31, 37, 41, 43 with consecutive gaps 6, 4, 2; that is, 37 - 31 = 6, 41 - 37 = 4, 43 - 41 = 2.
-
K:=2*10^5+1;; # to get all terms <= K.
P:=Filtered([1,3..K],IsPrime);; I:=Reversed([2,4,6]);;
P1:=List([1..Length(P)-1],i->P[i+1]-P[i]);;
P2:=List([1..Length(P)-Length(I)],i->[P1[i],P1[i+1],P1[i+2]]);;
P3:=List(Positions(P2,I),i->P[i+Length(I)]);
# More efficient
-
Filtered(Set(Flat(List([13,19],j->List([1..2000],i->30*i+j)))),j->IsPrime(j) and IsPrime(j-12) and not IsPrime(j-10) and not IsPrime(j-8) and IsPrime(j-6) and not IsPrime(j-4) and IsPrime(j-2)); # Muniru A Asiru, Jul 03 2018
-
for i from 1 to 10^5 do if ithprime(i+1)=ithprime(i)+6 and ithprime(i+2)=ithprime(i)+4 and ithprime(i+3)=ithprime(i)+2 then print(ithprime(i+3)); fi; od; # Corrected by Robert Israel, Jun 28 2018
# More efficient:
primes:= select(isprime,[seq(seq(30*i+j,j=[13,19]),i=1..10^4)]):
select(t -> isprime(t-2) and isprime(t-6) and isprime(t-12) and not isprime(t-8), primes); # Robert Israel, Jun 28 2018
-
With[{s = Differences@ Prime@ Range[10^4]}, Prime[1 + SequencePosition[s, {6, 4, 2}][[All, -1]] ] ] (* Michael De Vlieger, Aug 16 2017 *)
Select[Partition[Prime[Range[6000]],4,1],Differences[#]=={6,4,2}&][[All,4]] (* Harvey P. Dale, Feb 13 2022 *)
-
is(n) = if(!ispseudoprime(n), return(0), my(v=[n-2, n-6, n-12]); if(v[1]==precprime(n-1) && v[2]==precprime(v[1]-1) && v[3]==precprime(v[2]-1), return(1))); 0 \\ Felix Fröhlich, Aug 10 2017
A385035
Primes p such that p + 8, p + 14, p + 18 and p + 20 are also primes.
Original entry on oeis.org
23, 53, 89, 263, 599, 1283, 1979, 3449, 5399, 5639, 11813, 14543, 41213, 42443, 44249, 47129, 55799, 57773, 65699, 74699, 75983, 79613, 84299, 87539, 88643, 88793, 88799, 113153, 115763, 126473, 143813, 148913, 150203, 160073, 163973, 167099, 176489, 178799, 178889, 209249
Offset: 1
p=23: 23+8=31, 23+14=37, 23+18=41, 23+20=43 —> prime quintuple: (23, 31, 37, 41, 43).
-
[p: p in PrimesUpTo(300000) | IsPrime(p+8) and IsPrime(p+14) and IsPrime(p+18) and IsPrime(p+20)]; // Vincenzo Librandi, Jul 04 2025
-
q:= p-> andmap(i-> isprime(p+i), [0, 8, 14, 18, 20]):
select(q, [5+6*i$i=0..35000])[]; # Alois P. Heinz, Jun 16 2025
-
Select[Prime[Range[20000]], AllTrue[#+{8, 14, 18,20}, PrimeQ]&] (* Stefano Spezia, Jun 18 2025 *)
Comments