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

A349643 Smallest prime p = prime(k) such that the n-th difference of (prime(k), ..., prime(k+n)) is zero.

Original entry on oeis.org

3, 17, 347, 41, 211, 271, 23, 191, 33151, 541, 70891, 152681, 856637, 158047, 2010581, 24239, 7069423, 15149419, 9472693, 347957, 479691493, 994339579, 132480637, 4462552643, 1342424483, 4757283367, 20674291411, 21170786093, 9941224877, 68864319317, 8660066477
Offset: 2

Views

Author

Pontus von Brömssen, Nov 23 2021

Keywords

Comments

Equivalently, a(n) 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.
a(n) = prime(k), where k is the smallest positive integer such that A095195(k+n,n) = 0.

Examples

			The first six consecutive primes for which the fifth difference is 0 are (41, 43, 47, 53, 59, 61), so a(5) = 41. The successive differences are (2, 4, 6, 6, 2), (2, 2, 0, -4), (0, -2, -4), (-2, -2), and (0).
		

Crossrefs

First column of A349644.
Cf. A095195.

Programs

  • Mathematica
    With[{prs=Prime[Range[10^6]]},Table[SelectFirst[Partition[prs,n+1,1],Differences[#,n]=={0}&][[1]],{n,2,21}]] (* The program generates the first 20 terms of the sequence. *) (* Harvey P. Dale, Aug 10 2024 *)
  • Python
    from math import comb
    from sympy import nextprime
    def A349643(n):
        plist, clist = [2], [1]
        for i in range(1,n+1):
            plist.append(nextprime(plist[-1]))
            clist.append((-1)**i*comb(n,i))
        while True:
            if sum(clist[i]*plist[i] for i in range(n+1)) == 0: return plist[0]
            plist = plist[1:]+[nextprime(plist[-1])] # Chai Wah Wu, Nov 25 2021

Formula

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

A350007 Array read by antidiagonals, n >= 2, m >= 0: T(n,m) is the smallest ludic number L(k) such that all n-th differences of (L(k), ..., L(k+n+m)) are zero, where L is A003309; T(n,m) = 0 if no such number exists.

Original entry on oeis.org

1, 71, 11, 6392047, 41, 41
Offset: 2

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Comments

Equivalently, T(n,m) 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+m.
T(n,m) = A003309(k), where k is the smallest positive integer such that A350004(n,k+j) = 0 for 0 <= j <= m.

Examples

			Array begins:
  n\m|     0        1        2        3        4        5
  ---+---------------------------------------------------
   2 |     1       71  6392047        ?        ?        ?
   3 |    11       41     1111  2176387 61077491 93320837
   4 |    41     1111   545977 27244691 93320837        ?
   5 |    47       91 27244691 93320837        ?        ?
   6 |    91    23309 93320837        ?        ?        ?
   7 |  1361  9899189        ?        ?        ?        ?
   8 |  4261    26233        ?        ?        ?        ?
   9 |   481  7110347        ?        ?        ?        ?
  10 | 46067 79241951        ?        ?        ?        ?
For n = 5 and m = 1, the first seven (n+m+1) consecutive ludic numbers for which all fifth (n-th) differences are 0 are (91, 97, 107, 115, 119, 121, 127), so T(5,1) = 91. The successive differences are (6, 10, 8, 4, 2, 6), (4, -2, -4, -2, 4), (-6, -2, 2, 6), (4, 4, 4), and (0, 0).
		

Crossrefs

Cf. A350005 (row n = 2), A350006 (column m = 0).
Cf. A003309, A349644 (counterpart for primes), A350003 (counterpart for lucky numbers), A350004.

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)*A003309(k+i+j) = 0 for 0 <= i <= m, where A003309(k) = T(n,m).

A349642 Smallest prime such that the next n prime gaps are in arithmetic progression.

Original entry on oeis.org

2, 2, 2, 17, 347, 2903, 15373, 128981, 19641263, 245333213, 245333213, 27797667517, 68439250465123, 68439250465123
Offset: 0

Views

Author

Pontus von Brömssen, Nov 23 2021

Keywords

Comments

Equivalently, a(n) is the smallest prime p = prime(k) such that there is a polynomial f of degree at most 2 such that f(j) = prime(j) for k <= j <= k + n.
Any sequence of at most 2 terms is considered to be a degenerate arithmetic progression, so a(n) = 2 (the smallest prime) for n <= 2.
a(n) is the smallest prime p = prime(k) such that A036263(k) = A036263(k+1) = ... = A036263(k+n-2).

Examples

			The three prime gaps following the prime 17 are 2, 4, and 6, which are in arithmetic progression. This is not true for any smaller prime, so a(3) = 17.
The eight prime gaps following the prime 19641263 are 20, 18, 16, 14, 12, 10, 8, and 6, which are in arithmetic progression. This is not true for any smaller prime, so a(8) = 19641263.
		

Crossrefs

From n = 3, second row of A349644.

Extensions

a(12)-a(13) from Martin Ehrenstein, Dec 05 2021

A350003 Array read by antidiagonals, n >= 2, m >= 0: T(n,m) is the smallest lucky number L(k) such that all n-th differences of (L(k), ..., L(k+n+m)) are zero, where L is A000959; T(n,m) = 0 if no such number exists.

Original entry on oeis.org

37, 87, 31, 87, 87, 87, 72979, 17781, 1263, 31
Offset: 2

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Comments

Equivalently, T(n,m) 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+m.
T(n,m) = A000959(k), where k is the smallest positive integer such that A350001(n,k+j) = 0 for 0 <= j <= m.

Examples

			Array begins:
  n\m|        0       1        2        3
  ---+-----------------------------------
   2 |       37      87       87    72979
   3 |       31      87    17781   196089
   4 |       87    1263   196089 63955483
   5 |       31    3687 17622975        ?
   6 |      517  390015        ?        ?
   7 |     1797    1797        ?        ?
   8 |     1797 2432367        ?        ?
   9 |      267 9157647        ?        ?
  10 |      483 1683501        ?        ?
For n = 4 and m = 1, the first six (n+m+1) consecutive lucky numbers for which all fourth (n-th) differences are 0 are (1263, 1275, 1281, 1285, 1291, 1303), so T(4,1) = 1263. The successive differences are (12, 6, 4, 6, 12), (-6, -2, ,2, 6), (4, 4, 4), and (0, 0).
		

Crossrefs

Cf. A330362 (row n=2), A350002 (column m=0).
Cf. A000959, A349644 (counterpart for primes), A350001, A350007 (counterpart for ludic numbers).

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)*A000959(k+i+j) = 0 for 0 <= i <= m, where A000959(k) = T(n,m).
Showing 1-4 of 4 results.