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

A052356 Least prime in A031932 (lesser of 14-twins) whose distance to the next 14-twin is 6*n.

Original entry on oeis.org

24749, 293, 3833, 21467, 23417, 14159, 3779, 18353, 773, 4817, 18959, 2939, 863, 7607, 3677, 8039, 5939, 2633, 7727, 13367, 51839, 51659, 7043, 5153, 8447, 26189, 1409, 113, 7853, 1847, 13859, 43223, 2423, 24533, 65867, 50909, 19763, 15173, 15527, 86477, 55229
Offset: 3

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 14-twins [A052380(7)] is 18 and its minimal increment is 6.
a(n) = p is the first prime initiating [p, p+14, p+6n, p+6n+14] quadruple and prime difference pattern of [14, 6n-14, 14].

Examples

			n = 4 results in [293,307,317,331] primes pattern and [14,24,14] difference pattern with 2 further primes (311 and 313) 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, 14] // Flatten; pp = p[[i]]; dd = Differences[pp]/6 - 2; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[10000] (* 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 + 14, q2 = p1; if(q1 > 0, d = (q2 - q1)/6 - 2; 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

A053325 First differences of A031932.

Original entry on oeis.org

180, 24, 456, 66, 24, 90, 456, 174, 264, 192, 318, 66, 210, 120, 66, 120, 84, 570, 84, 102, 54, 30, 276, 354, 324, 72, 84, 180, 156, 24, 336, 270, 114, 666, 324, 150, 90, 324, 96, 24, 126, 186, 108, 126, 24, 150, 162, 528, 186, 54, 120, 90, 300, 456, 120, 150
Offset: 1

Views

Author

Labos Elemer, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Differences[Transpose[Select[Partition[Prime[Range[1500]],2,1], Last[#]- First[#] == 14&]][[1]]] (* Harvey P. Dale, Aug 24 2012 *)

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

A192175 Array of primes determined by distance to next prime, by antidiagonals.

Original entry on oeis.org

2, 3, 7, 5, 13, 23, 11, 19, 31, 89, 17, 37, 47, 359, 139, 29, 43, 53, 389, 181, 199, 41, 67, 61, 401, 241, 211, 113, 59, 79, 73, 449, 283, 467, 293, 1831, 71, 97, 83, 479, 337, 509, 317, 1933, 523, 101, 103, 131, 491, 409, 619, 773, 2113, 1069, 887, 107
Offset: 1

Views

Author

Clark Kimberling, Jun 24 2011

Keywords

Comments

Row 1: primes p such that p+1 or p+2 is a prime.
Row r>1: primes p such that the least h for which p+2h is prime is r.

Examples

			Northwest corner:
  2.....3.....5.....11....17....29....41
  7.....13....19....37....43....67....79
  23....31....47....53....61....73....83
  89....359...389...401...449...479...491
  139...181...241...283...337...409...421
For example, 31 is in row 3 because 31+2*3 is a prime, unlike 31+2*1 and 31+2*2.  Every prime occurs exactly once.  For each row, it is not known whether it is finite.
		

Crossrefs

Programs

  • Mathematica
    z = 5000; (* z=number of primes used *)
    row[1] = (#1[[1]] &) /@ Cases[Array[{#1,
          PrimeQ[1 + Prime[#1]] || PrimeQ[2 + Prime[#1]]} &, {z}], {_, True}];
    Do[row[x] = Complement[(#1[[1]] &) /@ Cases[Array[{#1, PrimeQ[2 x + Prime[#1]]} &, {z}], {_, True}], Flatten[Array[row, {x - 1}]]], {x, 2, 16}]; TableForm[Array[Prime[row[#]] &, {10}]] (* A192175 array *)
    Flatten[Table[ Prime[row[k][[n - k + 1]]], {n, 1, 11}, {k, 1, n}]] (* A192175 sequence *)
    (* Peter J. C. Moses, Jun 20 2011 *)

A079017 Suppose p and q = p+14 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 15 possible difference patterns, namely [14], [2,12], [6,8], [8,6], [12,2], [2,4,8], [2,6,6], [2,10,2], [6,2,6], [6,6,2], [8,4,2], [2,4,6,2], [2,6,4,2], [2,2,4,2,4], [2,4,2,4,2]. Sequence gives smallest value of p for each difference pattern, sorted by magnitude.

Original entry on oeis.org

3, 5, 17, 23, 29, 47, 83, 89, 113, 137, 149, 197, 359, 509, 1997
Offset: 1

Views

Author

Labos Elemer, Jan 24 2003

Keywords

Examples

			p=1997, q=2011 has difference pattern [2,4,8] and {1997,1999,2003,2011} is the corresponding consecutive prime 4-tuple.
		

Crossrefs

A022006(1)=5, A022007(1)=7, A078847(1)=17, A078851(1)=19, A078946(1)=17, A078854(1)=23, A078948(1)=29, A078857(1)=47, A031932(1)=113, A078849(1)=149.

A174350 Square array: row n >= 1 lists the primes p for which the next prime is p+2n; read by antidiagonals.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 17, 19, 31, 89, 29, 37, 47, 359, 139, 41, 43, 53, 389, 181, 199, 59, 67, 61, 401, 241, 211, 113, 71, 79, 73, 449, 283, 467, 293, 1831, 101, 97, 83, 479, 337, 509, 317, 1933, 523, 107, 103, 131, 491, 409, 619, 773, 2113, 1069, 887
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2010

Keywords

Comments

Every odd prime p = prime(i), i > 1, occurs in this array, in row (prime(i+1) - prime(i))/2. Polignac's conjecture states that each row contains an infinite number of indices. In case this does not hold, we can use the convention to continue finite rows with 0's, to ensure the sequence is well defined. - M. F. Hasler, Oct 19 2018
A permutation of the odd primes (A065091). - Robert G. Wilson v, Sep 13 2022

Examples

			Upper left hand corner of the array:
     3     5    11    17    29    41    59    71   101 ...
     7    13    19    37    43    67    79    97   103 ...
    23    31    47    53    61    73    83   131   151 ...
    89   359   389   401   449   479   491   683   701 ...
   139   181   241   283   337   409   421   547   577 ...
   199   211   467   509   619   661   797   997  1201 ...
   113   293   317   773   839   863   953  1409  1583 ...
  1831  1933  2113  2221  2251  2593  2803  3121  3373 ...
   523  1069  1259  1381  1759  1913  2161  2503  2861 ...
  (...)
Row 1: p(2) = 3, p(3) = 5, p(5) = 11, p(7) = 17,... these being the primes for which the next prime is 2 greater: (lesser of) twin primes A001359.
Row 2: p(4) = 7, p(6) = 13, p(8) = 19,... these being the primes for which the next prime is 4 greater: (lesser of) cousin primes A029710.
		

Crossrefs

Rows 35, 40, 45, 50, ...: A204792, A126722, A204764, A050434 (row 50), A204801, A204672, A204802, A204803, A126724 (row 75), A184984, A204805, A204673, A204806, A204807 (row 100); A224472 (row 150).
Column 1: A000230.
Column 2: A046789.

Programs

  • Mathematica
    rows = 10; t2 = {}; Do[t = {}; p = Prime[2]; While[Length[t] < rows - off + 1, nextP = NextPrime[p]; If[nextP - p == 2*off, AppendTo[t, p]]; p = nextP]; AppendTo[t2, t], {off, rows}]; Table[t2[[b, a - b + 1]], {a, rows}, {b, a}] (* T. D. Noe, Feb 11 2014 *)
    t[r_, 0] = 2; t[r_, c_] := Block[{p = NextPrime@ t[r, c - 1], q}, q = NextPrime@ p; While[ p + 2r != q, p = q; q = NextPrime@ q]; p]; Table[ t[r - c + 1, c], {r, 10}, {c, r, 1, -1}] (* Robert G. Wilson v, Nov 06 2020 *)
  • PARI
    A174350_row(g, N=50, i=0, p=prime(i+1), L=[])={g*=2; forprime(q=1+p, , i++; if(p+g==p=q, L=concat(L, q-g); N--||return(L)))} \\ Returns the first N terms of row g. - M. F. Hasler, Oct 19 2018

Formula

a(n) = A000040(A174349(n)). - Michel Marcus, Mar 30 2016

Extensions

Definition corrected and other edits by M. F. Hasler, Oct 19 2018

A320705 Indices of primes followed by a gap (distance to next larger prime) of 14.

Original entry on oeis.org

30, 62, 66, 137, 146, 150, 162, 223, 250, 283, 309, 350, 360, 382, 402, 410, 424, 434, 503, 514, 526, 532, 536, 570, 610, 649, 654, 666, 687, 704, 706, 747, 780, 790, 867, 906, 919, 929, 967, 978, 981, 992, 1011, 1023, 1038, 1042, 1057, 1072, 1133, 1154, 1160, 1177, 1184
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031932.

Crossrefs

Equals A000720 o A031932.
Row 7 of A174349.
Indices of 14's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..1500] | NthPrime(n+1) - NthPrime(n) eq 14]; // Vincenzo Librandi, Mar 19 2019
  • Mathematica
    Select[Range[1500], Prime[#] + 14 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 19 2019 *)
    Position[Differences[Prime[Range[1200]]],14]//Flatten (* Harvey P. Dale, Nov 28 2024 *)
  • PARI
    A(N=100,g=14,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031932(n)).
A320705 = { i > 0 | prime(i+1) = prime(i) + 14 }.

A379239 Numbers k for which A003961(k)-sigma(k) is prime, where A003961 is fully multiplicative with a(prime(i)) = prime(i+1), and sigma is the sum of divisors function.

Original entry on oeis.org

4, 6, 7, 10, 12, 13, 15, 19, 21, 22, 23, 28, 31, 33, 34, 35, 37, 39, 43, 45, 47, 48, 51, 53, 55, 58, 61, 67, 73, 76, 77, 79, 82, 83, 84, 89, 95, 97, 103, 105, 109, 111, 112, 113, 115, 118, 123, 124, 127, 129, 131, 141, 142, 143, 145, 148, 151, 153, 155, 156, 157, 159, 161, 163, 165, 167, 173, 185, 187, 192, 193, 199
Offset: 1

Views

Author

Antti Karttunen, Dec 23 2024

Keywords

Examples

			10 is included as A003961(10)-sigma(10) = 21-18 = 3 which is prime.
13 is included as A003961(13)-sigma(13) = 17-14 = 3 which is prime.
23 is included as A003961(23)-sigma(23) = 29-24 = 5 which is prime.
		

Crossrefs

Cf. A000203, A003961, A286385, A379238 (characteristic function).
Subsequences: A023200, A031924, A031926, A031930, A031932, A031936, A031938, etc, i.e., all primes for which the gap to the next prime is one more than some prime.
Cf. also A349165.

Programs

Showing 1-10 of 14 results. Next