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

A358571 Lesser p of a sexy prime pair such that (p-3)/2 is also the lesser prime of a sexy prime pair.

Original entry on oeis.org

13, 17, 37, 97, 457, 557, 1117, 1217, 1297, 2237, 2377, 2897, 4937, 7237, 9277, 10457, 18797, 21317, 23557, 24077, 27817, 29437, 30757, 34757, 38917, 39157, 48157, 48817, 50497, 55897, 60617, 62297, 64997, 72617, 81157, 82457, 90017, 94597, 107837, 108877, 111857
Offset: 1

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, sums of the form (sexy primes - 3) which are also the lesser prime of a sexy prime pair.
Also numbers m such that m-4, m-1, m+5 and m+8 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
More generally, any sequence of numbers m such that A254636(m - 2*k - 2), A254636(m - 1), A254636(m + 4*k + 1) and A254636(m + 6*k + 2) are all 0 will only provide prime numbers which are lesser of a pair of primes (p, q) such that the pair (r, s) forms also a pair of primes, where q = p + 2*(2*k + 1), r = (p - 2*k - 1)/2, and s = (q + 2*k + 1)/2. Obviously, s - r = q - p = 2*(2*k + 1).
For k = 0, we get sequence A256386 (starting from its 6th term).
For k = 1, this sequence.
For k = 2, sequence starts: 19, 31, 43, 79, 127, 163, 283, 547, 751, 919, ...
For k = 3, sequence starts: 17, 53, 113, 593, 773, 1553, 1733, 1973, 4013, ...
For k = 4, sequence starts: 19, 131, 431, 811, 991, 2111, 5431, 6011, 10771, ...
etc.
For n > 1, a(n) is congruent to 17 modulo 20.
Number of terms < 10^k: 0, 4, 6, 15, 38, 167, 934, 5091, 30229, ...

Examples

			97 is the lesser in the sexy prime pair (97, 103), and the pair of (97-3)/2 and (103+3)/2 yields another sexy prime pair: (47, 53). Hence 97 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[11000]], AllTrue[Join[{#+6}, (#-3)/2 + {0,6}], PrimeQ]&] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    isok1(p) = isprime(p) && isprime(p+6); \\ A023201
    isok(p) = isok1(p) && isok1((p-3)/2); \\ Michel Marcus, Nov 23 2022

A358572 Smallest prime p in a sexy prime triple such that (p-3)/2 is also the smallest prime in a sexy prime triple (A023241).

Original entry on oeis.org

17, 97, 1117, 1217, 2897, 130337, 188857, 207997, 221197, 324517, 610817, 900577, 1090877, 1452317, 1719857, 1785097, 2902477, 3069917, 3246317, 4095097, 4536517, 4977097, 5153537, 5517637, 5745557, 6399677, 7168277, 7351957, 7588697, 7661077, 8651537, 8828497, 9153337
Offset: 1

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Also numbers m such that m-4, m-1, m+5, m+8, m+11 and m+20 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Subsequence of A358571.
Number of terms < 10^k: 0, 2, 2, 5, 5, 12, 34, 150, 655, ...
All terms p and (p-3)/2 have a final decimal digit of 7. This follows from considering possibilities modulo 10 and implies p + 18 and (p-3)/2 + 18 are divisible by 5 and hence composite. Both p and (p-3)/2 are therefore also terms of A046118. - Andrew Howroyd, Dec 31 2022

Examples

			97 is the smallest prime in the sexy prime triple (97, 103, 109), and the triple (47 = (97 - 3)/2, 47 + 6, 47 + 12) forms another sexy prime triple. Hence 97 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[700000]], AllTrue[Join[# + {6,12}, (#-3)/2 + {0, 6, 12}], PrimeQ] &] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    istriple(p)={isprime(p) && isprime(p+6) && isprime(p+12)}
    isok(p)={istriple(p) && istriple((p-3)/2)}
    { forprime(p=1,10^7,if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Dec 30 2022

A358573 a(n) = smallest prime p such that q, r and s are all prime, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Original entry on oeis.org

11, 13, 19, 17, 19, 229, 47, 29, 163, 29, 31, 37, 47, 53, 1231, 41, 43, 61, 83, 61, 439, 1217, 59, 73, 59, 61, 67, 89, 83, 541, 71, 73, 103, 593, 271, 349, 83, 89, 103, 461, 239, 97, 107, 97, 211, 149, 107, 229, 263, 181, 499, 317, 139, 1453, 131, 809, 127, 137, 163
Offset: 0

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, smallest prime of the form (p + q - 2*n - 1), where p is prime, q = p + 2*(2*n + 1) is prime, and (p + q + 2*n + 1) is also prime.
a(n) is the first term of the sequence of numbers m such that (m - 2*n - 2), (m - 1), (m + 4*n + 1) and (m + 6*n + 2) cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Such sequence contains only prime numbers which are the lesser of a pair of primes (p, q) such that the pair (r, s) also forms a pair of primes with the same difference, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Examples

			229 is the lesser prime in the pair (229, 251) with difference 2*(2*5+1) = 22, and the couple (229-22/2)/2 = 109 and (251+22/2)/2 = 131 forms another prime pair with distance 22, and there is no prime lower than 229 with this property. Hence a(5) = 229.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p=2, q, r, s}, While[!AllTrue[{(q = p + 2*(2*n + 1)), (r = (p - 2*n - 1)/2), (s = (q + 2*n + 1)/2)}, #>0 && PrimeQ[#] &], p = NextPrime[p]]; p]; Array[a, 60, 0] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    a(n) = my(p=2, q); while(!isprime(q = p + 2*(2*n + 1)) || !isprime((p - 2*n - 1)/2) || !isprime((q + 2*n + 1)/2), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 23 2022
Showing 1-3 of 3 results.