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

A052358 Least prime in A031936 (lesser of 18-twins) whose distance to the next 18-twin is 2*n.

Original entry on oeis.org

20183, 20963, 14011, 26759, 7433, 45613, 4703, 21911, 26539, 18233, 6581, 4423, 7351, 37379, 55903, 25801, 4373, 6529, 35879, 119993, 22171, 12923, 10691, 52609, 14303, 20201, 16231, 21121, 103049, 17863, 6451, 34439, 50341, 76129, 3803, 23251, 15241, 14369
Offset: 9

Views

Author

Labos Elemer, Mar 07 2000

Keywords

Comments

The smallest distance between 18-twins [A052380(9)] is 18 and its minimal increment is 2.
a(n) = p is the first prime initiating [p, p+18, p+2n, p+2n+18] prime and [18, 2n-18, 18] d-pattern.

Examples

			a(11) = 14011 initiates prime quadruple [14011, 14029, 14033, 14051] and difference pattern [18, 4, 18].
a(15) = 4703 specifies prime quadruple  [4703, 4721, 4133, 4151] which includes 2 primes (4723, 4729) in the center, and difference pattern [18, 28, 18].
		

Crossrefs

Programs

  • Mathematica
    seq[m_] := Module[{p = Prime[Range[m]], d, i, pp, dd, j}, d = Differences[p]; i = Position[d, 18] // Flatten; pp = p[[i]]; dd = Differences[pp]/2 - 8; j = TakeWhile[FirstPosition[dd, #] & /@ Range[Max[dd]] // Flatten, ! MissingQ[#] &]; pp[[j]]]; seq[12000] (* 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 + 18, q2 = p1; if(q1 > 0, d = (q2 - q1)/2 - 8; 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

a(21) corrected and missing terms inserted by Sean A. Irvine, Nov 07 2021
Name and offset corrected by Amiram Eldar, Mar 05 2025

A053327 First differences of A031936.

Original entry on oeis.org

546, 190, 122, 378, 154, 248, 342, 358, 942, 86, 270, 214, 50, 40, 140, 100, 30, 326, 150, 274, 528, 218, 222, 78, 52, 38, 540, 192, 42, 40, 26, 162, 262, 308, 570, 348, 184, 456, 200, 244, 498, 62, 378, 1488, 52, 50, 42, 160, 60, 780, 78, 42, 128, 22, 270, 66
Offset: 1

Views

Author

Labos Elemer, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    With[{p = Prime[Range[2000]]}, Differences[p[[Position[Differences[p], 18] // Flatten]]]] (* Amiram Eldar, Mar 10 2025 *)

A153418 Primes p such that p+18 is also prime.

Original entry on oeis.org

5, 11, 13, 19, 23, 29, 41, 43, 53, 61, 71, 79, 83, 89, 109, 113, 131, 139, 149, 163, 173, 179, 181, 193, 211, 223, 233, 239, 251, 263, 293, 313, 331, 349, 379, 383, 401, 421, 431, 439, 443, 449, 461, 491, 503, 523, 569, 599, 601, 613, 641, 643, 659, 673, 683
Offset: 1

Views

Author

Keywords

Comments

Both p and p+18 have the same digital root (A010888). - Zak Seidov, Sep 14 2015
No term belongs to A030432. - Michel Marcus, Sep 14 2015
No term belongs to A045437. - Bruno Berselli, Sep 14 2015

Examples

			5 is in sequence because 5+18=23 is also prime;
11 is in sequence because 11+18=29 is also prime.
		

Crossrefs

A031936 is a subsequence. - Zak Seidov, Sep 13 2015

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(p+18)]; // Vincenzo Librandi, Apr 14 2013
    
  • Mathematica
    lst={};d=18;Do[p=Prime[n];If[PrimeQ[p+d],AppendTo[lst,p]],{n,6!}];lst
    Select[Prime[Range[150]], PrimeQ[(# + 18)]&] (* Vincenzo Librandi, Apr 14 2013 *)
  • PARI
    list(n)=forprime(p=1,n,if(isprime(p+18),print1(p", ")))  \\ Anders Hellström, Sep 13 2015
    
  • Sage
    [p for p in primes(700) if is_prime(p+18)]; # Bruno Berselli, Sep 14 2015

Extensions

Definition improved by Bruno Berselli, Oct 31 2012

A052189 Primes p such that p, p+18, p+36 are consecutive primes.

Original entry on oeis.org

20183, 21893, 25373, 29251, 30431, 34613, 50423, 54833, 56131, 58111, 63541, 66413, 74453, 74471, 76543, 76561, 77933, 78241, 81421, 107563, 108421, 110441, 112163, 121403, 122081, 122561, 131023, 132893, 132911, 135283, 137303, 137831, 143141, 144593, 145643
Offset: 1

Views

Author

Labos Elemer, Jan 28 2000

Keywords

Comments

Old name was "Primes p(k) such that p(k+2)-p(k+1)=p(k+1)-p(k)=18."

Examples

			20183 is a term since , 20183, 20201, and 20219 are consecutive primes with difference of 18.
		

Crossrefs

Subsequence of A031936
A033448 is a subsequence.

Programs

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

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

A031937 Upper prime of a difference of 18 between consecutive primes.

Original entry on oeis.org

541, 1087, 1277, 1399, 1777, 1931, 2179, 2521, 2879, 3821, 3907, 4177, 4391, 4441, 4481, 4621, 4721, 4751, 5077, 5227, 5501, 6029, 6247, 6469, 6547, 6599, 6637, 7177, 7369, 7411, 7451, 7477, 7639, 7901, 8209, 8779, 9127, 9311, 9767
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A031935.

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[1300]],2,1],Last[#]-First[#] == 18&]][[2]] (* Harvey P. Dale, Oct 06 2011 *)

Formula

a(n) = A031936(n)+18.

A117838 Smaller of two consecutive prime numbers with the same digital root.

Original entry on oeis.org

523, 1069, 1259, 1381, 1759, 1913, 2161, 2503, 2861, 3803, 3889, 4159, 4373, 4423, 4463, 4603, 4703, 4733, 5059, 5209, 5483, 6011, 6229, 6451, 6529, 6581, 6619, 7159, 7351, 7393, 7433, 7459, 7621, 7883, 8191, 8761, 9109, 9293, 9551, 9749, 9949
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 30 2006

Keywords

Comments

Contains all sequences with primes that are followed by a prime gap which is a multiple of 18 - since adding multiples of 9 does not change the digital root and the gaps are even. So A031936 (gap 18) and A134117 (gap 36) are subsequences and lower primes of prime gap 54 (35617, 40289, 40639, 86869, 100853,...), prime gap 72 (31397, 360091, 507217, 517639, 633667, 650107, 705317....) or prime gap 90 (404851,576791,..), for example, are also in here (cf. A000230). - R. J. Mathar, Apr 14 2008

Examples

			523 and 541 are two consecutive prime numbers with the same digital root, namely 1.
		

Programs

  • Mathematica
    Select[Prime[Range[1250]],Mod[ # - 1, 9] + 1 ==Mod[NextPrime[#]-1,9]+1&] (* James C. McMahon, Sep 14 2024 *)
  • PARI
    isA117838(p)={ (nextprime(p+1)-p)%9==0 }
    forprime( p=1,10^4, isA117838(p) & print1(p", ")) \\ M. F. Hasler, Apr 13 2008

Formula

{A000040(i): 18 | A001223(i), any i}. - R. J. Mathar, Apr 14 2008

Extensions

Corrected by R. J. Mathar and M. F. Hasler, Apr 13 2008

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

A320707 Indices of primes followed by a gap (distance to next larger prime) of 18.

Original entry on oeis.org

99, 180, 205, 221, 274, 293, 326, 368, 416, 529, 539, 573, 597, 602, 607, 623, 635, 639, 677, 693, 725, 785, 811, 838, 844, 852, 855, 916, 937, 939, 942, 945, 968, 997, 1028, 1093, 1130, 1151, 1203, 1227, 1252, 1304, 1311, 1349, 1508, 1514, 1519, 1523, 1540, 1547, 1629, 1636, 1641, 1654, 1656
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031936.

Crossrefs

Equals A000720 o A031936.
Row 9 of A174349.
Indices of 18'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..1700] | NthPrime(n+1) - NthPrime(n) eq 18]; // Vincenzo Librandi, Mar 22 2019
  • Mathematica
    Select[Range[1700], Prime[#] + 18 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 22 2019 *)
    Flatten[Position[Differences[Prime[Range[2000]]],18]] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    A(N=100,g=18,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(A031936(n)).
A320707 = { i > 0 | prime(i+1) = prime(i) + 18 } = A001223^(-1)({18}).
Showing 1-10 of 13 results. Next