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

A349644 Array read by antidiagonals, n >= 2, m >= 0: T(n,m) is the smallest prime p = prime(k) such that all n-th differences of (prime(k), ..., prime(k+n+m)) are zero.

Original entry on oeis.org

3, 251, 17, 9843019, 347, 347, 121174811, 2903, 2903, 41
Offset: 2

Views

Author

Pontus von Brömssen, Nov 23 2021

Keywords

Comments

T(n,m) = prime(k), where k is the smallest positive integer such that A095195(j,n) = 0 for k+n <= j <= k+n+m.
Equivalently, T(n,m) is the smallest prime p = prime(k) such that there is a polynomial f of degree at most n-1 such that f(j) = prime(j) for k <= j <= k+n+m.

Examples

			Array begins:
  n\m|   0       1           2           3           4
  ---+------------------------------------------------
  2  |   3     251     9843019   121174811           ?
  3  |  17     347        2903       15373      128981
  4  | 347    2903       15373      128981    19641263
  5  |  41    8081      128981    19641263   245333213
  6  | 211  128981    19641263   245333213   245333213
  7  | 271  386471    81028373   245333213 27797667517
  8  |  23 2022971   245333213 27797667517           ?
  9  | 191 7564091 10246420463           ?           ?
		

Crossrefs

Cf. A006560 (row n=2), A349642 (row n=3), A349643 (column m=0).
Cf. A095195.

Programs

  • Python
    from sympy import nextprime
    def A349644(n,m):
        d = [float('inf')]*(n-1)
        p = [0]*(n+m)+[2]
        c = 0
        while 1:
            del p[0]
            p.append(nextprime(p[-1]))
            d.insert(0,p[-1]-p[-2])
            for i in range(1,n):
                d[i] = d[i-1]-d[i]
            if d.pop() == 0:
                if c == m: return p[0]
                c += 1
            else:
                c = 0

Formula

T(n,m) <= T(n-1,m+1).
T(n,m) <= T(n, m+1).
Sum_{j=0..n} (-1)^j*binomial(n,j)*prime(k+i+j) = 0 for 0 <= i <= m, where prime(k) = T(n,m).

A350201 a(n) is the smallest prime p such that the Hankel matrix of the 2*n-1 consecutive primes starting at p is singular; a(n) = 0 if no such p exists.

Original entry on oeis.org

23, 2, 25771, 74159, 245333129, 245333113
Offset: 3

Views

Author

Pontus von Brömssen, Dec 19 2021

Keywords

Comments

a(n) is the k-th prime, where k is the smallest positive integer such that A350200(n,k) = 0.
For a(n) = prime(k), a nontrivial linear relation c_1*prime(j) + ... + c_n*prime(j+n-1) = 0 holds for k <= j <= k+n-1. The vector (c_1, ..., c_n) is in the kernel of the Hankel matrix of (prime(k), ..., prime(k+2*n-2)). (Such a relation always holds for k <= j <= k+n-2, starting with an arbitrary sequence in place of the primes.)

Examples

			Example
    |           |               |         vector in the kernel
  n |      a(n) | primepi(a(n)) |         of the Hankel matrix
  --+-----------+---------------+------------------------------
  3 |        23 |            9  |                   (7,  3, -8)
  4 |         2 |            1  |               (6, -3, -2,  1)
  5 |     25771 |         2838  |           (1, -2,  2, -2,  1)
  6 |     74159 |         7315  |       (1, -2,  1,  1, -2,  1)
  7 | 245333129 |     13437898  |    (0, 0,  0,  1, -3,  3, -1)
  8 | 245333113 |     13437897  | (0, 0, 0,  0,  1, -3,  3, -1)
For n = 3, the relation 7*prime(j) + 3*prime(j+1) - 8*prime(j+2) = 0 holds for 9 <= j <= 11, i.e.,
  7*23 + 3*29 - 8*31 = 0,
  7*29 + 3*31 - 8*37 = 0,
  7*31 + 3*37 - 8*41 = 0.
The ten prime gaps following prime(13437901) = 245333213 are 20, 18, 16, 14, 12, 10, 8, 6, 4, 2 (see A349642). This gives both a(7) = prime(13437898) and a(8) = prime(13437897).
		

Crossrefs

Programs

  • Python
    from sympy import prime,nextprime,Matrix
    def A350201(n):
        p = [prime(j) for j in range(1,2*n)]
        while Matrix(n,n,lambda i,j:p[i+j]).det():
            del p[0]
            p.append(nextprime(p[-1]))
        return p[0]
Showing 1-2 of 2 results.