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.

Showing 1-10 of 14 results. Next

A022008 Initial member of prime sextuples (p, p+4, p+6, p+10, p+12, p+16).

Original entry on oeis.org

7, 97, 16057, 19417, 43777, 1091257, 1615837, 1954357, 2822707, 2839927, 3243337, 3400207, 6005887, 6503587, 7187767, 7641367, 8061997, 8741137, 10526557, 11086837, 11664547, 14520547, 14812867, 14834707, 14856757, 16025827, 16094707, 18916477, 19197247
Offset: 1

Views

Author

Keywords

Comments

Without the initial 7, this gives primes at which difference pattern X42424Y (X and Y >= 8) occurs in A001223. - Labos Elemer
Subsequence of A022007. - Zak Seidov, Nov 01 2011
From Jean-Christophe Hervé, Sep 27 2014: (Start)
The primes in a sextuple a(n), a(n)+4, a(n)+6, a(n)+10, a(n)+12, a(n)+16 are consecutive since a(n)+2, a(n)+8 and a(n)+14 cannot be prime (multiple of 3).
The prime sextuples starting at a(n) give the highest concentration of primes that can occur on an interval of 17 integers (apart intervals starting at p < 7). It is conjectured that there are infinitely many such sextuples.
For n > 1, the 3 odd integers preceding and the 3 odd integers following the sextuple are not prime: a(n)-2 == a(n)+18 == 0 (mod 5), a(n)-4 == a(n)+20 == 0 (mod 3), a(n)-6 == a(n)+22 == 0 (mod 7) and thus a(n) == 97 (mod 210 = 2*3*5*7). (End)
All terms are congruent to 7 (mod 30). - Zak Seidov, May 07 2017
All terms but the first one are congruent to 97 (mod 210). - M. F. Hasler, Jan 18 2022

Examples

			n=2: 97, 101, 103, 107, 109, 113 are consecutive primes, while 91, 93, 95 and 115, 117 and 119 are not (cf. 4th comment about the border of composites).
		

Crossrefs

Cf. A022007.
Cf. A350826 (number of n-digit terms).

Programs

  • GAP
    P:=Filtered([1,3..2*10^7+1],IsPrime);;  I:=[4,2,4,2,4];;
    P1:=List([1..Length(P)-1],i->P[i+1]-P[i]);;
    A022008:=List(Positions(List([1..Length(P)-Length(I)],i->[P1[i],P1[i+1],P1[i+2],P1[i+3],P1[i+4]]),I),j->P[j]); # Muniru A Asiru, Sep 03 2017
  • Magma
    [p: p in PrimesUpTo(2*10^7) | IsPrime(p+4) and IsPrime(p+6) and IsPrime(p+10)and IsPrime(p+12) and IsPrime(p+16)]; // Vincenzo Librandi, Aug 23 2015
    
  • Maple
    for i from 1 to 2*10^5 do if [ithprime(i+1), ithprime(i+2), ithprime(i+3), ithprime(i+4), ithprime(i+5)] = [ithprime(i)+4,ithprime(i)+6,ithprime(i)+10,ithprime(i)+12,ithprime(i)+16] then print(ithprime(i)); fi; od; # Muniru A Asiru, Sep 03 2017
  • Mathematica
    lst = {}; Do[p = Prime[n]; If[PrimeQ[p+4] && PrimeQ[p+6] && PrimeQ[p+10] && PrimeQ[p+12] && PrimeQ[p+16], AppendTo[lst, p]], {n, 1000000}]; lst
    Transpose[Select[Partition[Prime[Range[10^6]],6,1],Differences[#]=={4,2,4,2,4}&]][[1]] (* Harvey P. Dale, Mar 15 2015 *)
  • PARI
    p=2;q=3;r=5;s=7;t=11;forprime(u=13,1e9,if(u-p==16 && p%3==1, print1(p", "));p=q;q=r;r=s;s=t;t=u) \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    {next_A022008(p, L=Vec(p+1,5), m=210, r=Mod(97,m))=for(i=1,oo, L[i%5+1]+16==(p=nextprime(p+1))&&break; p%m>111 && until(r==p=nextprime((p+8)\/210*210+97),); L[i%5+1]=p); p-16} \\ M. F. Hasler, Jan 18 2022
    
  • Perl
    use ntheory ":all"; say for sieve_prime_cluster(1,1e8, 4,6,10,12,16); # Dana Jacobsen, Sep 30 2015
    

A052168 Primes at which difference pattern X4242Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

1867, 3457, 5647, 15727, 79687, 88807, 101107, 257857, 266677, 276037, 284737, 340927, 354247, 375247, 402757, 419047, 427237, 463447, 470077, 626617, 666427, 736357, 823717, 855727, 959467, 978067, 1022377, 1043587, 1068247, 1118857
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Comments

All terms are == 7 (mod 30). - Zak Seidov, May 07 2017

Examples

			1867 is here because the successor primes (1867),1871,1873,1877,1879 give 4242 difference pattern. The primes around this island are 1861 and 1889 in distance 6 and 10 resp. Thus the d-pattern "around 1867" is {6,4,2,4,2,10}. [corrected by _Zak Seidov_, May 07 2017]
		

Crossrefs

Programs

  • Mathematica
    m=1867; Reap[Do[While[ PrimeQ[m] m = m + 30]; If[
    m > NextPrime[m, -1] + 5 &&  AllTrue[m + {4, 6, 10, 12}, PrimeQ] && NextPrime[m + 12] > m + 17, Sow[m]]; m = m + 30, {10^5}]][[2, 1]] (* Zak Seidov, May 07 2017 *)

A052165 Primes at which the difference pattern X,2,4,2,Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

191, 821, 2081, 3251, 9431, 13001, 15641, 18041, 18911, 25301, 31721, 34841, 51341, 62981, 67211, 69491, 72221, 77261, 81041, 82721, 97841, 99131, 109841, 116531, 119291, 122201, 135461, 157271, 171161, 187631, 194861, 201491, 217361
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Comments

All terms == 11 (mod 30). - Robert Israel, Nov 30 2015

Examples

			191 is here because 191 + 2 = 193, 191 + 4 + 2 = 197, 191 + 2 + 4 + 2 = 199 are primes; the prime preceding 191 is 181; the prime following 199 is 211; and the corresponding differences are 10 and 12. Thus the d-pattern "around 191" is {10,2,4,2,12}.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[2,seq(i,i=3..10^6,2)]):
    Gaps:= Primes[2..-1]-Primes[1..-2]:
    Primes[select(t -> Gaps[t] = 2 and Gaps[t+1] = 4 and Gaps[t+2] = 2 and Gaps[t-1] >= 6 and Gaps[t+3]>=6, [$2..nops(Gaps)-3])]; # Robert Israel, Nov 30 2015
  • Mathematica
    With[{x = 6, y = 6, s = Partition[#, 6, 1] &@ Prime@ Range[3*10^4]}, Select[s, And[First@ # >= x, Last@ # >= y, Most@ Rest@ # == {2, 4, 2}] &@ Differences@ # &]][[All, 2]] (* Michael De Vlieger, Oct 26 2017 *)

A047078 Primes at which difference pattern X2Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

29, 59, 137, 149, 179, 239, 269, 419, 431, 521, 569, 599, 659, 809, 1019, 1031, 1049, 1061, 1151, 1229, 1289, 1319, 1619, 1721, 1931, 1949, 2027, 2111, 2129, 2309, 2339, 2549, 2591, 2729, 2789, 2969, 2999, 3119, 3299, 3329, 3359, 3371, 3389, 3539, 3557
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Examples

			59 is here because 59 + 2 = 61 is prime, but the difference pattern around 59 is {[53] 6 [59] 2 [61] 6 [67]}.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[2, 500], Times @@ Boole@ {First@ # >= 6, #[[2]] == 2, Last@ # >= 6} == 1 &@ Differences@ Prime[# + Range[-1, 2]] &@ PrimePi@ # &] (* Michael De Vlieger, Jul 04 2016 *)

A052163 Primes at which the difference pattern X24Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

347, 641, 1277, 1607, 2237, 2267, 2657, 3527, 3671, 3917, 4001, 4127, 4637, 4931, 4967, 5477, 5501, 6197, 8087, 8231, 8537, 8861, 9461, 10331, 10427, 11171, 11777, 12107, 12917, 13757, 13901, 14081, 14321, 14627, 17027, 18251, 19991, 20477
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Examples

			641 is in the sequence because 641 + 2 = 643, 641 + 2 + 4 = 647 is prime, the prime prior to 641 is 631, the prime after 647 is 653, and the corresponding differences are 10 or 6. The d-pattern is {10,2,4,6}.
		

Crossrefs

A052166 Primes at which the difference pattern X424Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

37, 223, 307, 457, 853, 877, 1087, 1297, 1423, 1993, 2683, 4513, 4783, 5227, 6823, 7873, 8287, 10453, 13687, 13873, 16183, 17383, 20743, 21313, 23053, 23557, 23623, 24103, 27733, 29017, 31387, 33343, 33613, 35527, 36007, 37987, 40423, 42013
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Examples

			37 is here because 37 + 4 = 41, 37 + 4 + 2 = 43, 37 + 4 + 2 + 4 = 47 are consecutive primes and the prime preceding 37 is 31, the prime following 47 is 53, and the corresponding differences are 6 and 6. Thus the d-pattern "around 37" is {6,4,2,4}.
		

Crossrefs

Programs

  • Mathematica
    okQ[n_List]:=Module[{d=Differences[n]},Take[d,{2,4}]=={4,2,4} && First[d]>5&&Last[d]>5]; Transpose[Select[ Partition[ Prime[ Range[ 4400]], 6, 1],okQ]][[2]] (* Harvey P. Dale, Jul 17 2011 *)

A052167 Primes at which difference pattern X2424Y (X and Y >= 6) occurs in A001223.

Original entry on oeis.org

1481, 21011, 22271, 55331, 144161, 165701, 166841, 195731, 201821, 225341, 247601, 268811, 326141, 347981, 361211, 397751, 465161, 518801, 536441, 633461, 633791, 661091, 768191, 795791, 829721, 857951, 876011, 958541, 1008851
Offset: 1

Views

Author

Labos Elemer, Jan 26 2000

Keywords

Examples

			21011 is here because 21011+{2,2+4,2+4+2,2+4+2+4}=21011+{1,6,8,12}= {21013,21013,21017,21019,21023} are consecutive primes but the primes in the immediate neighborhood (21001 and 21031) are in distance 10 and 8. Thus the d-pattern "around 21011" is {10,2,4,2,4,12}.
		

Crossrefs

Programs

  • Mathematica
    patQ[n_]:=Module[{d=Differences[n]},First[d]>5&&Last[d]>5&&Most[ Rest[d]] == {2,4,2,4}]; Transpose[Select[Partition[Prime[ Range[ 80000]],7,1],patQ]] [[2]] (* Harvey P. Dale, Dec 11 2013 *)

A102332 Initial prime p introducing a prime sextuplet of consecutive primes as follows: {p, p+10, p+18, p+28, p+36, p+46} with the corresponding prime-difference-pattern is {10,8,10,8,10}.

Original entry on oeis.org

37861, 39181, 324763, 692743, 810391, 945331, 1047961, 1429573, 1513573, 1540813, 1799071, 3463573, 3861223, 3979201, 4536121, 4641001, 5154343, 5445403, 5874853, 7851583, 8820793, 8961373, 8976403, 9302113, 9673351, 10323133, 11074033, 11136883, 11899333, 13505983
Offset: 1

Views

Author

Labos Elemer, Jan 06 2005

Keywords

Comments

A generalization of primes displayed in A022008.

Crossrefs

Programs

  • Mathematica
    tm=TimeUsed[];ta={{0}};Do[g=n;d1=10;d2=8;d3=10;d4=8;d5=10; s1=Prime[n+1]-Prime[n];s2=Prime[n+2]-Prime[n+1]; s3=Prime[n+3]-Prime[n+2];s4=Prime[n+4]-Prime[n+3]; s5=Prime[n+5]-Prime[n+4];If[Equal[s1, d1]&&Equal[s2, d2]&& Equal[s3, d3]&&Equal[s4, d4]&&Equal[s5, d5], Print[{Prime[n], s1, s2, s3, s4, s5}];ta=Append[ta, Prime[n]]], {n, 1, 10000000}] {ta=Delete[ta, 1], {d1, d2}} {g, TimeUsed[]-tm}
    Transpose[Select[Partition[Prime[Range[650000]],6,1],Differences[#]=={10,8,10,8,10}&]][[1]] (* Harvey P. Dale, Oct 18 2013 *)
  • PARI
    list(lim) = {my(p1 = 2, p2 = 3, p3 = 5, p4 = 7, p5 = 11); forprime(p6 = 13, lim, if(p2 - p1 == 10 && p3 - p2 == 8 && p4 - p3 == 10 && p5 - p4 == 8 && p6 - p5 == 10, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4; p4 = p5; p5 = p6);} \\ Amiram Eldar, Feb 18 2025

Formula

a(n) == 1 (mod 6). - Amiram Eldar, Feb 18 2025

Extensions

Definition corrected by Harvey P. Dale, Oct 18 2013

A102333 Initial terms of quartets of consecutive primes as follows: {p, p+16, p+24, p+40}. The corresponding difference-pattern is {16,8,16}.

Original entry on oeis.org

108247, 121507, 166783, 169567, 178207, 216133, 257053, 258763, 272863, 274123, 372613, 383533, 384343, 396157, 413143, 501577, 562477, 577153, 581353, 635293, 721267, 727273, 738937, 769903, 908113, 917713, 932497, 937903, 965467, 980377, 989647, 1008547, 1126537
Offset: 1

Views

Author

Labos Elemer, Jan 06 2005

Keywords

Comments

A generalization of A052378.

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[78000]],4,1],Differences[#] == {16,8,16}&]][[1]] (* Harvey P. Dale, Mar 18 2012 *)
  • PARI
    list(lim) = {my(p1 = 2, p2 = 3, p3 = 5); forprime(p4 = 7, lim, if(p2 - p1 == 16 && p3 - p2 == 8 && p4 - p3 == 16, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4);} \\ Amiram Eldar, Feb 18 2025

Formula

a(n) == 1 (mod 6). - Amiram Eldar, Feb 18 2025

A102334 Initial terms of quintuplets of consecutive primes as follows: {p, p+16, p+24, p+40, p+48}. The corresponding difference-pattern is {16,8,16,8}.

Original entry on oeis.org

272863, 274123, 372613, 1394893, 1634293, 2380423, 3846373, 5298523, 5358013, 5797903, 6741913, 7554823, 7647643, 7716103, 7738153, 8241463, 8358283, 9710473, 9859783, 12454333, 12510193, 12796423, 13710133, 14477893, 15162493, 15186583, 15263503, 15603853, 16438243, 16771933, 17913283, 18957973, 19373623
Offset: 1

Views

Author

Labos Elemer, Jan 06 2005

Keywords

Comments

A generalization of A022007.

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[1233300]], 5, 1], Differences[#] == {16, 8, 16, 8} &][[;;, 1]] (* Amiram Eldar, Feb 18 2025 *)
  • PARI
    list(lim) = {my(p1 = 2, p2 = 3, p3 = 5, p4 = 7); forprime(p5 = 11, lim, if(p2 - p1 == 16 && p3 - p2 == 8 && p4 - p3 == 16 && p5 - p4 == 8, print1(p1, ", ")); p1 = p2; p2 = p3; p3 = p4; p4 = p5);} \\ Amiram Eldar, Feb 18 2025

Formula

a(n) == 13 (mod 30). - Amiram Eldar, Feb 18 2025

Extensions

Missing terms a(1)-a(11) inserted by Amiram Eldar, Feb 18 2025
Showing 1-10 of 14 results. Next