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 16 results. Next

A052355 Least prime in A031930 (lesser of 12-twins) whose distance to the next 12-twin is 2*n.

Original entry on oeis.org

199, 7937, 3331, 3049, 1511, 1789, 28607, 7001, 20599, 2069, 18257, 46477, 1201, 15569, 1459, 467, 23087, 23041, 2399, 6101, 7057, 6607, 23801, 3931, 3499, 9029, 5197, 7841, 3191, 1237, 3259, 45767, 4801, 1811, 1709, 40867, 23497, 125441, 5419, 3989, 18077, 21787
Offset: 6

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 12-twins [A052380(6)] is 12 and its minimal increment is 2.
a(n) = p specifies a quadruple [p, p+12, p+2n, p+2n+12] with difference pattern of [12, 2n-12, 12].

Examples

			a(7) = 7937 results in [7937, 7949, 7951, 7963] quadruple and [12, 2, 12] difference pattern.
a(10) = 1511 specifies [1511, 1523, 1531, 1543] quadruple and [12, 8, 12] difference pattern without prime in the central gap.
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 12] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 5; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[1q000] (* Amiram Eldar, Mar 05 2025 *)
  • PARI
    list(len) = {my(s = vector(len), c = 0, p1 = 2, q1 = 0, q2, d); forprime(p2 = 3, , if(p2 == p1 + 12, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 5; if(d <= len && s[d] == 0, c++; s[d] = q1; if(c == len, return(s)))); q1 = q2); p1 = p2);} \\ Amiram Eldar, Mar 05 2025

Extensions

Name and offset corrected by Amiram Eldar, Mar 05 2025

A053324 First differences of A031930.

Original entry on oeis.org

12, 256, 42, 110, 42, 136, 200, 204, 36, 70, 152, 40, 12, 20, 178, 80, 22, 78, 180, 30, 198, 102, 48, 132, 42, 156, 150, 122, 18, 102, 22, 68, 72, 16, 152, 60, 100, 272, 58, 90, 20, 298, 12, 140, 130, 12, 110, 76, 42, 120, 48, 110, 64, 158, 88, 320, 100, 174, 50
Offset: 1

Views

Author

Labos Elemer, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Differences[Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==12&][[;;,1]]] (* Harvey P. Dale, Sep 28 2024 *)

A086140 Primes p such that three (the maximum number) primes occur between p and p+12.

Original entry on oeis.org

5, 7, 11, 97, 101, 1481, 1867, 3457, 5647, 15727, 16057, 16061, 19417, 19421, 21011, 22271, 43777, 43781, 55331, 79687, 88807, 101107, 144161, 165701, 166841, 195731, 201821, 225341, 247601, 257857, 266677, 268811, 276037, 284737, 326141, 340927
Offset: 1

Views

Author

Labos Elemer, Jul 29 2003

Keywords

Comments

p+12 must be a prime. - Harvey P. Dale, Jun 11 2015
A086140 is the union of A022006 and A022007. By merging the two b-files I have extended the current b-file up to n=10000 (nearly n=20000 would have been possible). I add a comparison (see Links) between the frequency of prime 5-tuples and an asymptotic approximation, which is unproven but likely to be true, and based on a conjecture first published by Hardy and Littlewood in 1923. Twins, triples and quadruplets are treated as well. - Gerhard Kirchner, Dec 07 2016

Examples

			There are two types of prime 5-tuples, and both are represented in this sequence. (11, 13, 17, 19, 23) is a prime 5-tuple of the form (p, p+2, p+6, p+8, p+12), so 11 is in the sequence, and (97, 101, 103, 107, 109) is a prime 5-tuple of the form (p, p+4, p+6, p+10, p+12), so 97 is in the sequence. - _Michael B. Porter_, Dec 19 2016
		

Crossrefs

Cf. A031930, A046133, A086139, A086136, A022006, A022007, A001359 (twins), A007529 (triples), A007530 (quadruplets).

Programs

  • Mathematica
    cp[x_, y_] := Count[Table[PrimeQ[i], {i, x, y}], True] {d=12, k=0}; Do[s=Prime[n]; s1=Prime[n+1]; If[PrimeQ[s+d]&&Equal[cp[s+1, s+d-1], 3], k=k+1; Print[s]], {n, 1, 100000}]
    (* Second program: *)
    Transpose[Select[Partition[Prime[Range[30000]],5,1],#[[5]]-#[[1]] == 12&]][[1]] (* Harvey P. Dale, Jun 11 2015 *)

A052188 Primes p such that p, p+12, p+24 are consecutive primes.

Original entry on oeis.org

199, 1499, 4397, 4679, 7829, 9859, 11287, 11399, 11719, 12829, 15149, 16607, 17419, 17839, 18329, 18719, 19727, 19937, 20149, 20509, 20719, 21649, 22039, 22247, 23789, 25609, 26029, 28057, 29587, 30047, 31039, 32467, 34159, 35117, 35839, 35899, 36217, 36809, 40099
Offset: 1

Views

Author

Labos Elemer, Jan 28 2000

Keywords

Comments

Corresponds to two consecutive 12's in A001223. - - M. F. Hasler, Jan 02 2020

Examples

			a(1) = 199, followed by the consecutive primes 199 + 12 = 211, 199 + 12 + 12 = 223.
		

Crossrefs

Subsequence of A031930.
Generalization of A047948 and A033451 if 6 replaced by 12.

Programs

  • Magma
    [p:p in PrimesUpTo(36000)| NextPrime(p)-p eq 12 and  NextPrime(p+12)-p eq 24]; // Marius A. Burtea, Jan 03 2020
  • Mathematica
    Transpose[Select[Partition[Prime[Range[3800]],3,1], Union[Differences[#]] =={12}&]][[1]]  (* Harvey P. Dale, Apr 26 2011 *)
  • PARI
    lista(nn) = {forprime(p=1, nn, q = nextprime(p+1); r = nextprime(q+1); if ((r-q==12) && (q-p==12), print1(p, ", ")););} \\ Michel Marcus, Jun 27 2015
    

Extensions

Name changed by Jon E. Schoenfield, May 30 2018

A098974 Primes p such that q-p = 24, where q is the next prime after p.

Original entry on oeis.org

1669, 2179, 4177, 4523, 4759, 5237, 6173, 6397, 6737, 7079, 7369, 7793, 8123, 8329, 9067, 11003, 11633, 11839, 12073, 12119, 13009, 13267, 16033, 16193, 16453, 16763, 16787, 17053, 17683, 17989, 18593, 18637, 19183, 19507, 20483, 22409, 22877, 23227
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 23 2004

Keywords

Comments

Lower prime of a difference of 24 between consecutive primes.
23 successive numbers after prime number p are composite. - Artur Jasinski, Jan 15 2007

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[Prime[x + 1] - Prime[x] == 24, AppendTo[a, Prime[x]]], {x, 1, 10000}]; a (* Artur Jasinski, Jan 15 2007 *)

Extensions

Entry revised by N. J. A. Sloane, Feb 13 2007

A126784 Primes p such that q-p = 32, where q is the next prime after p.

Original entry on oeis.org

5591, 10799, 27701, 27851, 33647, 39047, 41081, 41687, 43721, 44417, 45989, 47459, 50789, 52457, 55259, 55547, 61781, 62351, 64817, 66239, 67307, 69959, 73907, 79907, 80567, 82307, 84089, 88037, 94169, 94961, 99191, 99929, 100559, 102611
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Feb 24 2007

Keywords

Comments

Lower prime of a difference of 32 between consecutive primes.

Crossrefs

Programs

  • PARI
    lista(nn) = {p = 2; while (p < nn, q = nextprime(p+1); if (q - p == 32, print1(p, ", ")); p = q;);} \\ Michel Marcus, Jul 17 2013

A083371 Primes p such that q-p >= 8, where q is the next prime after p.

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
Offset: 1

Views

Author

Benoit Cloitre, Jun 04 2003

Keywords

Comments

The original definition by Cloitre was: [Start from any initial value F(1) >= 2 and define F(n) as the largest prime factor of F(1)+F(2)+F(3)+...+F(n-1). The sequence contains the primes satisfying F(2*p)=p supposed F(1)=7. Conjecture: F(n)= n/2+O(log n) and the sequence is infinite.] Don Reble showed Jan 22 2022 that these are the same primes p followed by a prime gap of q-p >=8, where q is the next prime after p: [
Let X' be the first prime after X, 'X be the first prime before X.
The F sequence starting at "7" has 11 "7"s, then 6 "11"s, 6 "13"s, 6 "17"s, 6 "19"s, 10 "23"s, ...
One easily sees that the F sequence starting at prime S has S' instances of S; then for each prime P after S, it has (P'-'P) instances of P. (A076973 is the F sequence starting at "2".)
The primes from S to P occupy the first [S' + (S''-S) + (S'''-S') + ... + (P' - 'P)] terms of F.
That sum telescopes to P'+P-S, and so
F(P'+P-S) = P; F(P'+P-S+1) = P';
F(P+'P-S) = 'P; F(P+'P-S+1) = P.
If F(X) =P, then P+'P-S < X <= P'+P-S.
If F(2P)=P, then P+'P-S < 2P <= P'+P-S
'P < P+S <= P'
S <= P'-P
So this sequence has the primes P for which P'-P >= 7; and since P'-P is even (both primes are odd), P'-P >= 8. q.e.d.]

Crossrefs

Cf. A076973.

Programs

  • Maple
    d:=8; M:=1000; t0:=[]; for n from 1 to M do p:=ithprime(n); if nextprime(p) - p >= d then t0:=[op(t0),p]; fi; od: t0; # N. J. A. Sloane, Dec 19 2006
    f := proc(n) option remember: if(n=1)then return 7: fi: return max(op(numtheory[factorset](add(f(i),i=1..n-1)))): end: seq(`if`(f(2*ithprime(n))=ithprime(n),ithprime(n),NULL),n=1..200); # Nathaniel Johnston, Jun 25 2011, via Cloitre's F
  • Mathematica
    Transpose[Select[Partition[Prime[Range[200]],2,1],Last[#]-First[#]>7&]][[1]] (* Harvey P. Dale, Jan 28 2013 *)

Formula

A000040 MINUS A124590. - R. J. Mathar, Jan 23 2022
A031926 UNION A031928 UNION A031930 UNION A031932 UNION ... - R. J. Mathar, Jan 23 2022

Extensions

Terms after a(20) from Nathaniel Johnston, Jun 26 2011
Merged with A124583 in response to Reble's seqfan post. - R. J. Mathar, Jan 24 2022

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

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Examples

			p=1601, q=1613 has difference pattern [6,2,4] and {1601,1607,1609,1613} is the corresponding consecutive prime 4-tuple.
		

Crossrefs

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.

Programs

  • Mathematica
    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 *)

A086136 Primes p such that p and p+12 are nonconsecutive primes.

Original entry on oeis.org

5, 7, 11, 17, 19, 29, 31, 41, 47, 59, 61, 67, 71, 89, 97, 101, 127, 137, 139, 151, 167, 179, 181, 227, 229, 239, 251, 257, 269, 271, 281, 337, 347, 367, 389, 397, 409, 419, 421, 431, 449, 479, 487, 491, 557, 587, 601, 607, 631, 641, 647, 727, 739, 757, 761, 809
Offset: 1

Views

Author

Labos Elemer, Jul 28 2003

Keywords

Comments

This sequence differs from A046133 because here the terms of A031930 are missing.
Complement of a=A031930 with respect to b=A046133: [b] & [not a]: this and A031930 are disjoint, but A031930 is a proper subset of A046133.

Examples

			First two deviations from A046133 are that 199=A031930(1) and 211=A031930(2) are missing. First 20 terms are equal.
		

Crossrefs

Programs

  • Mathematica
    Do[s=Prime[n]; s1=Prime[n+1]; If[PrimeQ[s+d]&& !Equal[s1-s, d], Print[s]], {n, 1, 1000}]; d=12
    ncpQ[n_]:=Module[{c=n+12},PrimeQ[c]&&NextPrime[n]!=c]; Select[Prime[ Range[ 150]],ncpQ] (* Harvey P. Dale, May 03 2012 *)

A086139 Let p = A046133(n), that is, let p run through the list of primes such that p+12 is also prime (A046133); a(n) = number of primes in the interval p + 1 through p + 11 inclusive.

Original entry on oeis.org

3, 3, 3, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 0, 0, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 2, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 0, 2, 2, 2, 2, 0, 1, 2, 1, 2, 0, 1, 3, 2, 0, 0, 0, 1, 1, 1, 2, 2
Offset: 1

Views

Author

Labos Elemer, Jul 29 2003

Keywords

Comments

From Michael De Vlieger, Jul 30 2017: (Start)
a(n) = 0 for n = {24, 25, 44, 48, 53, 57, 62, 70, 82, 84, 89, 94, ...}.
a(n) = 1 for n = {9, 14, 18, 19, 20, 21, 22, 23, 28, 29, 30, 33, ...}.
a(n) = 2 for n = {4, 5, 6, 7, 8, 10, 11, 12, 13, 17, 26, 27, 31, ...}.
a(n) = 3 for n = {1, 2, 3, 15, 16, 96, 118, 183, 266, 570, 581, ...}.
(End)

Examples

			For n=1, we have p=5, the primes between 5 and 5+12=17 are 7,11,13, so a(1)=3.
		

Crossrefs

Programs

  • Maple
    a:=[]; b:=[];
    for n from 1 to 200 do if isprime(ithprime(n)+12) then
       a:=[op(a),ithprime(n)];
    c:=0;
    for i from 1 to 11 do if isprime(ithprime(n)+i) then c:=c+1; fi; od;
    b:=[op(b),c];
    fi;
    od:
    a; # A046133b; # this sequence
  • Mathematica
    cp[x_,y_] := Count[Table[PrimeQ[i],{i,x,y}],True]; d = 12; Do[s = Prime[n]; If[PrimeQ[s+d], Print[cp[s+1,s+d-1]]], {n, 1, 1000}]
    (* Second program: *)
    With[{d = 12}, DeleteCases[#, -1] &@ Table[Function[p, If[PrimeQ[p + d],
    Count[Range[p + 1, p + d - 1], _?PrimeQ], -1] ]@ Prime@ n, {n, 252}]]
    PrimePi[#+11]-PrimePi[#+1]&/@Select[Prime[Range[400]],PrimeQ[#+12]&] (* Harvey P. Dale, Jul 30 2022 *)

Extensions

Definition edited by N. J. A. Sloane, Aug 05 2017 following analysis by Michael De Vlieger, Jul 30 2017
Showing 1-10 of 16 results. Next