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.

A376678 Position of first zero in the n-th differences of the primes, or 0 if it does not appear.

Original entry on oeis.org

0, 0, 2, 7, 69, 13, 47, 58, 9, 43, 3553, 100, 7019, 14082, 68097, 14526, 149677, 2697, 481054, 979719, 631894, 29811, 25340978, 50574254, 7510843, 210829337, 67248861, 224076286, 910615647, 931510269, 452499644, 2880203722, 396680865, 57954439970, 77572822440, 35394938648
Offset: 0

Views

Author

Gus Wiseman, Oct 14 2024

Keywords

Comments

Do the k-th differences of the primes contain a zero for all k > 1?

Examples

			The third differences of the primes begin:
  -1, 2, -4, 4, -4, 4, 0, -6, 8, ...
so a(3) = 7.
		

Crossrefs

If 1 is considered prime (A008578) we get A376855.
The zeros of second differences are A064113, complement A333214.
This is the position at which 0 first appears in row n of A095195.
For composite instead of prime we have A377037.
For squarefree instead of prime we have A377042, nonsquarefree A377050.
For prime-power instead of prime we have A377055.
A000040 lists the primes, first differences A001223, second A036263.

Programs

  • Mathematica
    nn=100000;
    u=Table[Differences[Select[Range[nn],PrimeQ],k],{k,2,16}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    m=Table[Position[u[[k]],0][[1,1]],{k,mnrm[Union[First/@Position[u,0]]]}]

Formula

a(n) = A000720(A349643(n)) for n >= 2. - Pontus von Brömssen, Oct 17 2024

Extensions

a(17)-a(32) from Pontus von Brömssen, Oct 17 2024
a(33)-a(35) from Lucas A. Brown, Nov 03 2024

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).

A350002 a(n) is the smallest lucky number L(k) such that the n-th difference of (L(k), ..., L(k+n)) is zero, where L is A000959; a(n) = 0 if no such number exists.

Original entry on oeis.org

37, 31, 87, 31, 517, 1797, 1797, 267, 483, 5649, 23815, 198223, 985921, 508401, 3720765, 1936245, 8302279, 16713091, 9857049, 16756749, 8904175
Offset: 2

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Comments

Equivalently, a(n) is the smallest lucky number L(k) such that there is a polynomial f of degree at most n-1 such that f(j) = L(j) for k <= j <= k+n.
a(n) = A000959(k), where k is the smallest positive integer such that A350001(n,k) = 0.

Examples

			The first six consecutive lucky numbers for which the fifth difference is 0 are (31, 33, 37, 43, 49, 51), so a(5) = 31. The successive differences are (2, 4, 6, 6, 2), (2, 2, 0, -4), (0, -2, -4), (-2, -2), and (0).
		

Crossrefs

First column of A350003.
Cf. A000959, A349643 (counterpart for primes), A350001, A350006 (counterpart for ludic numbers).

Formula

Sum_{j=0..n} (-1)^j*binomial(n,j)*A000959(k+j) = 0, where A000959(k) = a(n).

A350006 a(n) is the smallest ludic number L(k) such that the n-th difference of (L(k), ..., L(k+n)) is zero, where L is A003309; a(n) = 0 if no such number exists.

Original entry on oeis.org

1, 11, 41, 47, 91, 1361, 4261, 481, 46067, 5027, 31499, 888893, 126205, 36191, 7676353, 26794127, 206527, 2560375, 7716073
Offset: 2

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Comments

Equivalently, a(n) is the smallest ludic number L(k) such that there is a polynomial f of degree at most n-1 such that f(j) = L(j) for k <= j <= k+n.
a(n) = A003309(k), where k is the smallest positive integer such that A350004(n,k) = 0.
a(21) > 10^8 (unless a(21) = 0).

Examples

			The first six consecutive ludic numbers for which the fifth difference is 0 are (47, 53, 61, 67, 71, 77), so a(5) = 47. The successive differences are (6, 8, 6, 4, 6), (2, -2, -2, 2), (-4, 0, 4), (4, 4), and (0).
		

Crossrefs

First column of A350007.

Formula

Sum_{j=0..n} (-1)^j*binomial(n,j)*A003309(k+j) = 0, where A003309(k) = a(n).

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