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.

A348176 Numbers m such that the number of symmetrically distributed consecutive primes centered at m sets a new record.

Original entry on oeis.org

1, 2, 4, 5, 9, 12, 30, 165, 8021811, 1071065190, 1613902650, 1797595815015, 633925574060895
Offset: 1

Views

Author

Ya-Ping Lu, Oct 05 2021

Keywords

Comments

Conjecture: This sequence is infinite.

Examples

			n    a(n) = m   A346399(m)  Symmetrical consecutive primes centered at m
--  ----------  ----------  --------------------------------------------
1            1       0                           { }
2            2       1                           {2}
3            4       2                          {3,5}
4            5       3                         {3,5,7}
5            9       4                        {5,7,11,13}
6           12       6                     {5,7,11,13,17,19}
7           30      10             {13,17,19,23,29,31,37,41,43,47}
8          165      12                {m +- 2,8,14,16,26,28}
9      8021811      14              {m +- 10,20,22,40,52,58,62}
10  1071065190      16              {m +- 11,23,37,49,53,61,67,79}
11  1613902650      18             {m +- 1,7,23,29,49,77,83,89,97}
		

Crossrefs

Cf. A346399.

Programs

  • Python
    from sympy import isprime
    rec = -1
    for n in range(1, 10**10):
        d = 1 if n%2 == 0 else 2
        ct = 1 if isprime(n) else 0
        while n - d > 2:
            k = isprime(n+d) + isprime(n-d)
            if k == 2: ct += 2
            elif k == 1: break
            d += 2
        if ct > rec: print(n, end = ', '); rec = ct

Extensions

a(12)-a(13) from Martin Ehrenstein, Nov 21 2021