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

A354376 Smallest prime which is at the end of an arithmetic progression of exactly n primes.

Original entry on oeis.org

2, 3, 7, 43, 29, 157, 907, 2351, 5179, 2089, 375607, 262897, 725663, 36850999, 173471351, 198793279, 4827507229, 17010526363, 83547839407, 572945039351, 6269243827111
Offset: 1

Views

Author

Bernard Schott, May 24 2022

Keywords

Comments

Equivalently: Let i, i+d, i+2d, ..., i+(n-1)d be an arithmetic progression of exactly n primes; choose the one which minimizes the last term; then a(n) = last term i+(n-1)d.
The word "exactly" requires both i-d and i+n*d to be nonprime; without "exactly", we get A005115.
For the corresponding values of the first term, and the common difference, see A354377 and A354484. For the actual arithmetic progressions, see A354485.
The primes in these arithmetic progressions need not be consecutive. (The smallest prime at the start of a run of exactly n consecutive primes in arithmetic progression is A006560(n).)
a(n) != A005115(n), because A005115(n) + A093364(n) is prime for n = 4, 8, 9, 11. - Michael S. Branicky, May 24 2022

Examples

			The arithmetic progression (5, 11, 17, 23) with common difference 6 contains 4 primes, but 29 = 23+6 is also prime, hence a(4) != 23.
The arithmetic progression (7, 19, 31, 43) with common difference 12 also contains 4 primes, and 7-12 < 0 and 43+12 = 55 is composite; moreover this arithmetic progression is the smallest such progression with exactly 4 primes, hence a(4) = 43.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A5, Arithmetic progressions of primes.

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime
    def a(n):
        if n < 3: return [2, 3][n-1]
        p = 2
        while True:
            for d in range(2, (p-3)//(n-1)+1, 2):
                if isprime(p+d) or isprime(p-n*d): continue
                if all(isprime(p-j*d) for j in range(1, n)): return p
            p = nextprime(p)
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, May 24 2022

Extensions

a(4) corrected and a(8)-a(13) from Michael S. Branicky, May 24 2022
a(14)-a(21) derived using A005115 and A093364 by Michael S. Branicky, May 24 2022

A354485 Triangle read by rows: row n gives the arithmetic progression of exactly n primes with minimal final term, cf. A354376.

Original entry on oeis.org

2, 2, 3, 3, 5, 7, 7, 19, 31, 43, 5, 11, 17, 23, 29, 7, 37, 67, 97, 127, 157, 7, 157, 307, 457, 607, 757, 907, 881, 1091, 1301, 1511, 1721, 1931, 2141, 2351, 3499, 3709, 3919, 4129, 4339, 4549, 4759, 4969, 5179, 199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089
Offset: 1

Views

Author

Bernard Schott, May 29 2022

Keywords

Comments

For the corresponding values of the first term, the last term and the common difference of these arithmetic progressions, see respectively A354377, A354376 and A354484.
Without "exactly", we get A133277.
The primes in these arithmetic progressions need not be consecutive. (The smallest prime at the start of a run of exactly n consecutive primes in arithmetic progressions is A006560(n).)

Examples

			Triangle begins:
    2;
    2,    3;
    3,    5,    7;
    7,   19,   31,   43;
    5,   11,   17,   23,   29;
    7,   37,   67,   97,  127,  157;
    7,  157,  307,  457,  607,  757,  907;
  881, 1091, 1301, 1511, 1721, 1931, 2141, 2351;
  ...
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A5, Arithmetic progressions of primes, pp. 25-28.

Crossrefs

Formula

T(n, 1) = A354377.
T(n, n) = A354376.

A354484 Common differences associated with the arithmetic progressions of primes in A354376.

Original entry on oeis.org

0, 1, 2, 12, 6, 30, 150, 210, 210, 210, 30030, 13860, 60060, 420420, 4144140, 9699690, 87297210, 717777060, 4180566390, 18846497670, 26004868890
Offset: 1

Views

Author

Bernard Schott, May 28 2022

Keywords

Comments

Equivalently: Let i, i+d, i+2d, ..., i+(n-1)d be an arithmetic progression of exactly n primes; choose the one which minimizes the last term; then a(n) = common difference d.
The word "exactly" requires both i-d and i+n*d to be nonprime; without "exactly", we get A093364.
For the corresponding values of the first term and the last term, see respectively A354377 and A354376. For the actual arithmetic progressions, see A354485.
The primes in these arithmetic progressions need not be consecutive. (The smallest prime at the start of a run of exactly n consecutive primes in arithmetic progression is A006560(n).)

Examples

			The first few corresponding arithmetic progressions are:
d = 0:   (2);
d = 1:   (2, 3);
d = 2:   (3, 5, 7);
d = 12:  (7, 19, 31, 43);
d = 6:   (5, 11, 17, 23, 29);
d = 30:  (7, 37, 67, 97, 127, 157);
d = 150: (7, 157, 307, 457, 607, 757, 907).
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A5, Arithmetic progressions of primes, pp. 25-28.

Crossrefs

Formula

a(1) = 0, then for n > 1, a(n) = (A354376(n) - A354377(n)) / (n-1).

Extensions

a(7)-a(21) via A354376, A354377 from Michael S. Branicky, May 28 2022

A354743 Smallest first term of arithmetic progression of exactly n primes with difference A033188(n).

Original entry on oeis.org

2, 2, 3, 41, 5, 7, 7, 881, 3499, 199, 60858179, 147692845283, 14933623, 834172298383, 894476585908771, 1275290173428391, 259268961766921, 1027994118833642281
Offset: 1

Views

Author

Bernard Schott, Jun 05 2022

Keywords

Comments

Equivalently: Let i, i+d, i+2d, ..., i+(n-1)d be an arithmetic progression of exactly n primes; choose the first one which minimizes the common difference d; then a(n) = i.
The word "exactly" requires both i-d and i+n*d to be nonprime.
For the corresponding values of the last term, see A354744.
Without "exactly", we get A033189.
The primes in these arithmetic progressions need not be consecutive.
a(n) != A033189(n) for n = 4, 8, 9, 19 because in these particular cases A113872(n) + A033188(n) is prime.
a(8) = 881 and a(9) = 3499 found by Michael S. Branicky come from A354377.
a(19) > A033189(19) = 1424014323012131633 is not known, it is the smallest first term of an arithmetic progression of exactly 19 primes with a common difference d = 9699690; then a(20) = 1424014323012131633 and a(21) = 28112131522731197609.

Examples

			The first few corresponding arithmetic progressions are:
n = 1 and d = 0:   (2);
n = 2 and d = 1:   (2, 3);
n = 3 and d = 2:   (3, 5, 7);
n = 4 and d = 6:   (41, 47, 53, 59);
n = 5 and d = 6:   (5, 11, 17, 23, 29);
n = 6 and d = 30:  (7, 37, 67, 97, 127, 157);
n = 7 and d = 150: (7, 157, 307, 457, 607, 757, 907);
n = 8 and d = 210: (881, 1091,1301, 1511, 1721, 1931, 2141, 2351).
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A5, Arithmetic progressions of primes, pp. 25-28.

Crossrefs

A354744 Last term of arithmetic progression of exactly n primes with difference A033188(n) and first term = A354743(n).

Original entry on oeis.org

2, 3, 7, 59, 29, 157, 907, 2351, 5179, 2089, 60881279, 147692870693, 15293983, 834172688773, 894476586329191, 1275290173878841, 259268969935081, 1027994118842320951
Offset: 1

Views

Author

Bernard Schott, Jun 05 2022

Keywords

Comments

Equivalently: Let i, i+d, i+2d, ..., i+(n-1)d be an arithmetic progression of exactly n primes; choose the first one which minimizes the common difference d; then a(n) = i+(n-1)d.
The word "exactly" requires both i-d and i+n*d to be nonprime.
Without "exactly", we get A113872.
The primes in these arithmetic progressions need not be consecutive.
a(n) != 113872(n) for n = 4, 8, 9, 19 because in these particular cases A113872(n) + A033188(n) is prime.
a(8) = 2351 and a(9) = 5179, found by Michael S. Branicky come from A354376.
a(19) > A113872(19) = 1424014323186726053 is not known, it is the last term of the arithmetic progression of exactly 19 primes with a common difference d = 9699690 and first term = A354743(19); then a(20) = 1424014323196425743 and a(21) = 28112131522925191409.

Examples

			The first few corresponding arithmetic progressions are:
n = 1 and d = 0:   (2);
n = 2 and d = 1:   (2, 3);
n = 3 and d = 2:   (3, 5, 7);
n = 4 and d = 6:   (41, 47, 53, 59);
n = 5 and d = 6:   (5, 11, 17, 23, 29);
n = 6 and d = 30:  (7, 37, 67, 97, 127, 157);
n = 7 and d = 150: (7, 157, 307, 457, 607, 757, 907);
n = 8 and d = 210: (881, 1091,1301, 1511, 1721, 1931, 2141, 2351).
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A5, Arithmetic progressions of primes, pp. 25-28.

Crossrefs

Showing 1-5 of 5 results.