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-8 of 8 results.

A052197 Primes p such that p, p+36, p+72 are consecutive primes.

Original entry on oeis.org

255767, 704321, 806821, 884501, 913067, 1065137, 1216177, 1448497, 1526191, 1532471, 1640971, 1918571, 2071087, 2275067, 2276431, 2336671, 2347591, 2376721, 2778547, 3098561, 3190601, 3248941, 3259001, 3452107, 3558481
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)=36.

Examples

			a(3) = 704321 is followed by 704357 and 704393, consecutive primes with equal distance of d = 36.
		

Crossrefs

Subsequence of A134117.

Programs

  • Mathematica
    Select[Partition[Prime[Range[255000]],3,1],Differences[#]=={36,36}&][[All,1]] (* Harvey P. Dale, Feb 16 2018 *)
  • PARI
    is(n)=nextprime(n+1)==n+36 && nextprime(n+37)==n+72 && isprime(n) \\ Charles R Greathouse IV, Jan 07 2013

Extensions

New name from Charles R Greathouse IV, Jan 07 2013

A134116 Primes p such that q-p = 34, where q is the next prime after p.

Original entry on oeis.org

1327, 8467, 9973, 11743, 12163, 17257, 19087, 20443, 21433, 29683, 32653, 34549, 37747, 41299, 47743, 49957, 54217, 59887, 61057, 61297, 64237, 73483, 74653, 77383, 78367, 80863, 85159, 88177, 88609, 89329, 91639, 93337, 97039, 100069
Offset: 1

Views

Author

Rick L. Shepherd, Oct 08 2007

Keywords

Crossrefs

Programs

Formula

a(n) >> n log^2 n. - Charles R Greathouse IV, Sep 14 2015

A134118 Primes p such that q - p = 38, where q is the next prime after p.

Original entry on oeis.org

30593, 38393, 39461, 45779, 49559, 51071, 56999, 58271, 60821, 63863, 68399, 72173, 72383, 75041, 78653, 79493, 85259, 90749, 95819, 104243, 105563, 109751, 110183, 111053, 111149, 111539, 116201, 119321, 125963, 126359, 129803, 134951
Offset: 1

Views

Author

Rick L. Shepherd, Oct 08 2007

Keywords

Crossrefs

Programs

  • Maple
    a:=proc(n) if nextprime(ithprime(n))-ithprime(n)=38 then ithprime(n) else end if end proc: seq(a(n),n=1..15000); # Emeric Deutsch, Oct 24 2007
  • Mathematica
    Select[Prime[Range[5000]], NextPrime[#] == # + 38 &] (* Alonso del Arte, Apr 10 2016 *)
    Select[Partition[Prime[Range[13000]],2,1],#[[2]]-#[[1]]==38&][[All,1]] (* Harvey P. Dale, Oct 03 2020 *)
  • PARI
    lista(nn) = {p = 2; forprime (q = 3, nn, if (q-p == 38, print1(p, ", ")); p = q;);} \\ Michel Marcus, Apr 11 2016

A118590 Larger of two consecutive primes whose positive difference is a square.

Original entry on oeis.org

3, 11, 17, 23, 41, 47, 71, 83, 101, 107, 113, 131, 167, 197, 227, 233, 281, 311, 317, 353, 383, 401, 443, 461, 467, 491, 503, 617, 647, 677, 743, 761, 773, 827, 857, 863, 881, 887, 911, 941, 971, 1013, 1091, 1097, 1217, 1283, 1301, 1307, 1427, 1433, 1451, 1487
Offset: 1

Views

Author

Cino Hilliard, May 07 2006

Keywords

Examples

			7 and 11 are consecutive primes. 11-7 = 4 a square, so 11 is the second term in the table.
		

Crossrefs

Cf. A031935, A031505, A134117 (gap 6^2), A204670 (gap 8^2), A050434 (gap 10^2), A138198, A161002.

Programs

  • Mathematica
    Select[Table[Prime[n], {n, 2, 237}], IntegerQ[Sqrt[# - Prime[PrimePi[# - 1]]]] &] (* Jayanta Basu, Apr 23 2013 *)
    nn = 500; ps = Prime[Range[nn]]; t = {}; Do[If[IntegerQ[Sqrt[ps[[n]] - ps[[n-1]]]], AppendTo[t, ps[[n]]]], {n, 2, nn}]; t (* T. D. Noe, Apr 23 2013 *)
    Prime[#+1]&/@Flatten[Position[Differences[Prime[Range[250]]],?(IntegerQ[ Sqrt[#]]&)]] (* _Harvey P. Dale, May 08 2019 *)
  • PARI
    g(n) = for(x=2, n, if(issquare(prime(x)-prime(x-1)), print1(prime(x)",")))

Formula

Superset of A031935 and A031505. [From R. J. Mathar, Aug 08 2008]

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

A268305 Numbers k such that k - 37, k - 1, k + 1, k + 37 are consecutive primes.

Original entry on oeis.org

1524180, 3264930, 3970530, 5438310, 5642910, 6764940, 8176410, 10040880, 10413900, 10894320, 11639520, 12352980, 13556340, 15900720, 16897590, 17283360, 18168150, 18209100, 18686910, 19340220, 20099940, 20359020, 20483340, 21028290, 21846360
Offset: 1

Views

Author

Karl V. Keller, Jr., Apr 17 2016

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs), A249674 (divisible by 30) and A256753.
The numbers k - 37 and k + 1 belong to A156104 (p and p + 36 are primes) and A134117 (p where p + 36 is the next prime).
The numbers k - 37 and k - 1 belong to A271347 (p and p + 38 are primes).

Examples

			1524180 is the average of the four consecutive primes 1524143, 1524179, 1524181, 1524217.
3264930 is the average of the four consecutive primes 3264893, 3264929, 3264931, 3264967.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    Select[Partition[Prime[Range[14*10^5]],4,1],Differences[#]=={36,2,36}&][[All,2]]+1 (* Harvey P. Dale, Mar 12 2018 *)
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,30000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-37 and nextprime(i+1) == i+37 : print (i,end=', ')

A320716 Indices of primes followed by a gap (distance to next larger prime) of 36.

Original entry on oeis.org

1183, 1532, 1663, 1847, 2146, 2489, 2500, 2550, 2700, 2976, 3087, 3238, 3461, 4236, 4483, 4681, 4692, 4834, 4849, 4946, 5178, 5836, 6062, 6098, 6269, 6591, 6613, 6787, 6862, 6904, 7091, 7178, 7200, 7285, 7577, 7743, 8057, 8097, 8215, 8355, 8572, 8637, 8767, 8832, 8877, 9023, 9129, 9161
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A134117.

Crossrefs

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

Programs

  • PARI
    A(N=100,g=36,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(A134117(n)).
A320716 = { i>0 | prime(i+1) = prime(i) + 36 }.
Showing 1-8 of 8 results.