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.

User: Sally Myers Moite

Sally Myers Moite's wiki page.

Sally Myers Moite has authored 7 sequences.

A309158 The smallest prime, a(n), larger than prime(n) for which every even difference from 2 to prime(n) - 1 occurs at least once for some pair of primes from prime(n) to a(n) inclusive.

Original entry on oeis.org

5, 11, 13, 23, 31, 47, 47, 53, 67, 67, 73, 101, 101, 107, 113, 131, 139, 151, 151, 151, 173, 179, 193, 193, 227, 227, 233, 241, 241, 283, 283, 293, 293, 313, 313, 353, 353, 353, 353, 397, 397, 397, 421, 421, 421, 461, 461, 467, 467, 503, 503, 503, 521, 563, 569, 599, 599
Offset: 2

Author

Sally Myers Moite, Jul 14 2019

Keywords

Comments

The "prime differences prime" a(n) is the smallest prime greater than prime(n), n > 1, for which every even difference from 2 to prime(n)-1 occurs for some pair of primes from prime(n) to a(n) inclusive.
a(n) is at least prime(n) + (prime(n) - 1) = 2 * prime(n) - 1.
If the sequence of prime differences primes is infinite, there are infinitely many pairs of primes for each even difference. If there are only finitely many pairs of primes for some even difference, the sequence ends.
Ratios a(n)/prime(n), n = 2 to 15 are 1.67, 2.20, 1.86, 2.09, 2.38, 2.76, 2.47, 2.30, 2.31, 2.16, 1.97, 2.46, 2.35, 2.28.
Conjecture: The sequence is infinite.
Conjecture: There are finitely many values of n with a(n) = 2 * prime(n) - 1.
Conjecture: There are infinitely many values of n with a(n) = a(n-1).
Conjecture: For all n, a(n) <= 3 * prime(n). (This is true for n <= 101.)

Examples

			For n = 4, prime(4) = 7 and 7 - 1 = 6. Check differences for 7 and 11: 11 - 7 = 4. For 7, 11, and 13: 11 - 7 = 4, 13 - 7 = 6, 13 - 11 = 2, so a(4) = 13.
Also prime(6) = 13, 13 - 1 =  12. For 13, 17, 19, 23, 29 and 31, 29 - 17 = 12, 23 - 13 = 10, 31 - 23 = 8, 19 - 13 = 6, 17 - 13 = 4, 19 - 17 = 2, and a(6) = 31.
		

Crossrefs

Programs

  • Maple
    for n from 2 to 58 do
       a := ithprime(n):
       for d from 2 by 2 to a - 1 do
          p := ithprime(n);
          while not isprime(p + d) do
               p := nextprime(p)
          od;
          if p + d > a then a := p + d fi
       od;
       print(n, a)
    od: # Peter Luschny, Jul 17 2019
  • Mathematica
    For [n=2,n <= 101,n++,
         Clear[d];d=0;
         Clear[a];a=Prime[n];
         While[d < Prime[n]-1,
               d=d+2;
               Clear[m];m=n;
               While[CompositeQ[d+Prime[m]],m++];
               If[d+Prime[m] > a,a=d+Prime[m]]];
         Print[{n,Prime[n],a,N[a/Prime[n]]}]
         ]

A307563 Numbers k such that both 6k - 1 and 6k + 7 are prime.

Original entry on oeis.org

1, 2, 4, 5, 9, 10, 12, 15, 17, 22, 25, 29, 32, 39, 44, 45, 60, 65, 67, 72, 75, 80, 82, 94, 95, 99, 100, 109, 114, 117, 120, 124, 127, 137, 152, 155, 164, 169, 172, 177, 185, 194, 199, 204, 205, 214, 215, 220, 229, 240, 242, 247, 254, 260, 262, 267, 269, 270, 289, 304, 312, 330, 334, 347, 355, 359, 369, 374, 379, 389
Offset: 1

Author

Sally Myers Moite, Apr 14 2019

Keywords

Comments

There are 140 such numbers between 1 and 1000.
These numbers correspond to all the prime pairs which differ by 8 except 3 and 11.
Numbers in this sequence are those which are not 6cd - c - d - 1, 6cd + c - d, 6cd - c + d or 6cd + c + d - 1, that is, they are not (6c - 1)d - c - 1, (6c - 1)d + c, (6c + 1)d - c or (6c + 1)d + c - 1.

Examples

			a(4) = 5, so 6(5) - 1 = 29 and 6(5) + 7 = 37 are both prime.
		

Crossrefs

The primes are A023202, A092402, A031926.
Similar sequences for twin primes are A002822, A067611, for "cousin" primes A056956, A186243.
Intersection of A024898 and A153218.
Cf. also A307561, A307562.

Programs

  • Maple
    select(t -> isprime(6*t-1) and isprime(6*t+7), [$1..500]); # Robert Israel, May 27 2019
  • PARI
    isok(n) = isprime(6*n-1) && isprime(6*n+7); \\ Michel Marcus, Apr 16 2019

A307562 Numbers k such that both 6*k + 1 and 6*k + 7 are prime.

Original entry on oeis.org

1, 2, 5, 6, 10, 11, 12, 16, 17, 25, 26, 32, 37, 45, 46, 51, 55, 61, 62, 72, 76, 90, 95, 100, 101, 102, 121, 122, 125, 137, 142, 146, 165, 172, 177, 181, 186, 187, 205, 215, 216, 220, 237, 241, 242, 247, 257, 270, 276, 277, 282, 290, 291, 292, 296, 297, 310, 311, 312, 331, 332, 335, 347, 355, 356, 380, 381, 390
Offset: 1

Author

Sally Myers Moite, Apr 14 2019

Keywords

Comments

There are 138 such numbers between 1 and 1000.
Prime pairs that differ by 6 are called "sexy" primes. Other prime pairs that differ by 6 are of the form 6n - 1 and 6n + 5.
Numbers in this sequence are those which are not 6cd - c - d - 1, 6cd - c - d, 6cd + c + d - 1 or 6cd + c + d, that is, they are not (6c - 1)d - c - 1, (6c - 1)d - c, (6c + 1)d + c - 1 or (6c + 1)d + c.

Examples

			a(3) = 5, so 6(5) + 1 = 31 and 6(5) + 7 = 37 are both prime.
		

Crossrefs

For the primes see A023201, A046117.
Similar sequences for twin primes are A002822, A067611, for "cousin" primes A056956, A186243.
Intersection of A024899 and A153218.
Cf. also A307561, A307563.

Programs

  • Mathematica
    Select[Range[400], AllTrue[6 # + {1, 7}, PrimeQ] &] (* Michael De Vlieger, Apr 15 2019 *)
  • PARI
    isok(n) = isprime(6*n+1) && isprime(6*n+7); \\ Michel Marcus, Apr 16 2019

A307561 Numbers k such that both 6*k - 1 and 6*k + 5 are prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 9, 14, 17, 18, 22, 28, 29, 32, 38, 39, 42, 43, 44, 52, 58, 59, 64, 74, 77, 84, 93, 94, 98, 99, 107, 108, 109, 113, 137, 143, 147, 157, 158, 162, 163, 169, 182, 183, 184, 197, 198, 203, 204, 213, 214, 217, 227, 228, 238, 239, 247, 248, 249, 259, 267, 268, 269, 312, 317, 318, 329, 333, 344
Offset: 1

Author

Sally Myers Moite, Apr 14 2019

Keywords

Comments

There are 146 terms below 10^3, 831 terms below 10^4, 5345 terms below 10^5, 37788 terms below 10^6 and 280140 terms below 10^7.
Prime pairs differing by 6 are called "sexy" primes. Other prime pairs with difference 6 are of the form 6n + 1 and 6n + 7.
Numbers in this sequence are those which are not 6cd + c - d - 1, 6cd + c - d, 6cd - c + d - 1 or 6cd - c + d, that is, they are not (6c - 1)d + c - 1, (6c - 1)d + c, (6c + 1)d - c - 1 or (6c + 1)d - c.

Examples

			a(2) = 2, so 6(2) - 1 = 11 and 6(2) + 5 = 17 are both prime.
		

Crossrefs

Primes differing from each other by 6 are A023201, A046117.
Similar sequences for twin primes are A002822, A067611, for "cousin" primes A056956, A186243.
Intersection of A024898 and A059325.
Cf. also A307562, A307563.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[6# - 1] && PrimeQ[6# + 5] &] (* Alonso del Arte, Apr 14 2019 *)
  • PARI
    is(k) = isprime(6*k-1) && isprime(6*k+5); \\ Jinyuan Wang, Apr 20 2019

A307211 a(n) = the "maximum first open number" for prime(n).

Original entry on oeis.org

2, 6, 12, 24, 42, 75, 90, 150, 180, 216, 312, 339, 447, 519, 615, 660, 783
Offset: 1

Author

Sally Myers Moite, Mar 28 2019

Keywords

Comments

This sequence is related to Goldbach's Conjecture.
Definition. Let P = prime(n). Choose one remainder and its negative for each prime up to and including P. Sieve the numbers 1, 2, 3, 4, ... to remove numbers congruent to either chosen remainder modulo the respective prime. Call the numbers left "open", and the smallest open number the "first open number" for that P and that choice of remainders. The maximum first open number for P is the largest first open number for any such choice of remainders.
Equivalently, let P = prime(n). Any positive integer c has a set of remainders modulo each prime up to and including P. Call a positive integer d "open" for c and P, if d has no remainder which is the same as, or is the negative of, any remainder of c modulo any prime up to and including P. There is a smallest, or first, open number d for any c. The maximum first open number for P is the largest first open number d for any positive integer c. (Only numbers c from 1 to P#, the product of the primes up to and including P, have to be considered.)
A problem is to find an upper limit for a(n) in terms of prime(n).
The ratios a(n)/prime(n), n = 1 to 14, are 1, 2, 2.4, 3.4, 3.8, 5.8, 5.3, 7.9, 7.8, 7.4, 10.1, 9.2, 10.9, 12.1, so a(n) appears to grow faster than prime(n).
The ratios log(a(n))/log(prime(n)), n = 1 to 14, are 1, 1.63, 1.54, 1.63, 1.56, 1.68, 1.59, 1.70, 1.66, 1.60, 1.67, 1.61, 1.64, 1.66, which appear to be bounded.
Conjecture 1: a(n) <= prime(n)^1.75.
Conjecture 2: a(n) <= prime(n) * (prime(n) - 1) / 2, n >= 5.
More terms are needed to check whether these conjectures are true for larger n.
Either conjecture implies that Goldbach's conjecture is true. (Stated as every even number greater than 6 is the sum of two different primes where 1 is not prime.)
Consider the sum (c - d) + (c + d) = 2c, where d is open for c and prime P, the smallest prime such that the primes up to and including P are sufficient to test whether two numbers that add to 2c are prime. If d were small enough, c - d is positive and both c - d and c + d would be prime, because c and d and also -c and d have no common remainders modulo every prime up to and including P.
Either conjecture would assure the existence of an open number d which is small enough, for every sufficiently large c.
For example, for P large enough, P^1.75 <= (P^2 - 3)/2. For a particular c, choose P so it is the largest prime with P <= sqrt(2c - 3). Rearranged, this gives (P^2 - 3)/2 <= c - 3. Thus d <= P^1.75 <= (P^2 - 3)/2 <= c - 3, so that c - d >= 3 is positive. Therefore Goldbach's Conjecture follows from Conjecture 1.
I think that conjectures 1 and 2 would imply that, for every gap 2n, there are an infinite number of prime pairs with that gap. I think they would also give an upper bound for the gap between pairs of primes with gap 2n.

Examples

			Let n = 4, so P = 7.
Choose, for example, remainders 1 (mod 2), 0 (mod 3), +-1 (mod 5), +-2 (mod 7).
Remove odd numbers and numbers divisible by 3 from 1, 2, 3,..., 49 (which should be enough numbers to sieve according to the conjectures) leaving 2, 4, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46.
Then remove numbers congruent to +-1 (mod 5), which leaves 2, 8, 10, 20, 22, 28, 32, 38, 40.
Finally remove numbers congruent to +-2 (mod 7), which leaves the "open" numbers 8, 10, 20, 22, 28, 32, 38, 46. The "first open number" is 8.
There are 2 * 2 * 3 * 4 = 48 ways of choosing remainders for P = 7 (0 or 1 for 2, 0 or +-1 for 3, 0, +-1 or +-2 for 5, 0, +-1, +-2 or +-3 for 7).
The maximum first open number for 7 is 24, for remainders 1 (mod 2), +-1 (mod 3), +-2 (mod 5) and +-1 (mod 7).
For another example, let n = 3, so P = 5. For numbers c, one need only consider the numbers 1 to 30 to account for all possible combinations of remainders mod 2, 3, and 5. The first open numbers for each of these numbers, for P = 5, are 12, 9, 4, 3, 6, 5, 6, 9, 2, 3, 12, 1, 6, 3, 2, 3, 6, 1, 12, 3, 2, 9, 6, 5, 6, 3, 4, 9, 12, 1 respectively. Therefore, for n = 3, the "maximum first open number" a(3) is 12.
		

Crossrefs

Programs

  • Outline
    a(n)=1
    P=prime(n)
    For each permutation m(n) of 1 to n
      i()={1,2,3,...,P^2}
      for j=1,n
        r=i(1) mod p=prime(m(j))
        eliminate numbers congruent to r or -r mod p from i()
      next j
      if i(1) > a(n)
      a(n)=i(1)
    next permutation

Formula

a(n) = max for all {r(1), ..., r(n)} min d = d({r}) where d >= 1, d !== r(i) (mod prime(i)), d !== -r(i) (mod prime(i)), i = 1, ..., n.
a(n) = max for all c >= 1, min d = d(c) where d >= 1, d !== c (mod p) and d !== -c (mod p) for all p, p prime, p <= prime(n).

Extensions

a(15)-a(17) from Bert Dobbelaere, Jun 02 2019

A307124 a(n) is twice the square of the product of the first n primes each decreased by one.

Original entry on oeis.org

2, 8, 128, 4608, 460800, 66355200, 16986931200, 5503765708800, 2663822603059200, 2088436920798412800, 1879593228718571520000, 2435952824419268689920000, 3897524519070829903872000000, 6875233251640943950430208000000
Offset: 1

Author

Sally Myers Moite, Mar 26 2019

Keywords

Comments

a(n) is also the number of pairs (c, d) for which d !== c (mod p) and d !== -c (mod p) for every prime p up to and including the n-th prime, where 1 <= c, d <= the product of the first n primes.
In some cases, c - d and c + d are prime with (c - d) + (c + d) = 2c, as in Goldbach's conjecture.

Examples

			a(4) = 2 * 1^2 * 2^2 * 4^2 * 6^2 = 4608.
For n = 2, 2 * 3 = 6, the pairs (c, d) are (1, 6), (2, 3), (3, 2), (3, 4), (4, 3), (5, 6), (6, 1) and (6, 5), so a(2) = 8.
		

Crossrefs

Programs

  • Magma
    [2*(&*[(NthPrime(i)-1)^2: i in [1..n]]): n in [1..14]]; // Marius A. Burtea, Jun 19 2019
  • Mathematica
    a[n_]:=2 Product[(Prime[i] - 1)^2, {i, 1, n}]; Array[a,10]
    2*FoldList[Times,(Prime[Range[15]]-1)^2] (* Harvey P. Dale, Jul 20 2022 *)
  • PARI
    a(n) = 2*prod(k=1, n, prime(k)-1)^2; \\ Michel Marcus, Mar 27 2019
    

Formula

From Jon E. Schoenfield, Mar 26 2019: (Start)
a(n) = 2*Product_{j=1..n} (prime(j)-1)^2.
a(n) = 2*A005867(n)^2. (End)

Extensions

First Mathematica program edited by Harvey P. Dale, Jul 20 2022

A323674 Square array, read by antidiagonals, of the positive integers 6cd +-c +-d = (6c +- 1)d +- c. Alternate rows (or columns) are numbers that differ by c from multiples of 6c - 1 or 6c + 1.

Original entry on oeis.org

4, 6, 6, 9, 8, 9, 11, 13, 13, 11, 14, 15, 20, 15, 14, 16, 20, 24, 24, 20, 16, 19, 22, 31, 28, 31, 22, 19, 21, 27, 35, 37, 37, 35, 27, 21, 24, 29, 42, 41, 48, 41, 42, 29, 24, 26, 34, 46, 50, 54, 54, 50, 46, 34, 26, 29, 36, 53, 54, 65, 60, 65, 54, 53, 36, 29, 31, 41, 57, 63, 71, 73, 73, 71, 63, 57, 41, 31
Offset: 1

Author

Sally Myers Moite, Jan 23 2019

Keywords

Comments

This sequence without duplicates is A067611, which is the complement of A002822, the positive integers x for which 6x - 1 and 6x + 1 are twin primes.

Examples

			Square array begins:
   4,   6,   9,  11,  14,  16,  19,  21,  24,  26, ...
   6,   8,  13,  15,  20,  22,  27,  29,  34,  36, ...
   9,  13,  20,  24,  31,  35,  42,  46,  53,  57, ...
  11,  15,  24,  28,  37,  41,  50,  54,  63,  67, ...
  14,  20,  31,  37,  48,  54,  65,  71,  82,  88, ...
  16,  22,  35,  41,  54,  60,  73,  79,  92,  98, ...
  19,  27,  42,  50,  65,  73,  88,  96, 111, 119, ...
  21,  29,  46,  54,  71,  79,  96, 104, 121, 129, ...
  24,  34,  53,  63,  82,  92, 111, 121, 140, 150, ...
  26,  36,  57,  67,  88,  98, 119, 129, 150, 160, ...
  ...
Note that, for example, the third row (or column) contains numbers that differ by 2 from multiples of 11 = 6*2 - 1, and the eighth row contains numbers that differ by 4 from multiples of 25 = 6*4 + 1.
		

Crossrefs

The first and second rows are A047209 and A047336.
The diagonal is A062717, the numbers x for which 6*x + 1 is a perfect square.

Programs

  • PARI
    a(m,n) = 6*floor((m+1)/2)*floor((n+1)/2) + ((-1)^n)*floor((m+1)/2) + ((-1)^m)*floor((n+1)/2);
    matrix(7, 7, n, k, a(n, k)) \\ Michel Marcus, Jan 25 2019

Formula

a(m,n) = 6*floor((m+1)/2)*floor((n+1)/2) + ((-1)^n)*floor((m+1)/2) + ((-1)^m)*floor((n+1)/2), m,n >= 1.