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.

Previous Showing 31-34 of 34 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).

A350001 Iterated differences of lucky numbers. Array read by antidiagonals, n >= 0, k >= 1: T(0,k) = A000959(k), T(n,k) = T(n-1,k+1) - T(n-1,k) for n > 0.

Original entry on oeis.org

1, 3, 2, 7, 4, 2, 9, 2, -2, -4, 13, 4, 2, 4, 8, 15, 2, -2, -4, -8, -16, 21, 6, 4, 6, 10, 18, 34, 25, 4, -2, -6, -12, -22, -40, -74, 31, 6, 2, 4, 10, 22, 44, 84, 158, 33, 2, -4, -6, -10, -20, -42, -86, -170, -328, 37, 4, 2, 6, 12, 22, 42, 84, 170, 340, 668
Offset: 0

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Examples

			Array begins:
  n\k|    1    2    3    4    5    6    7     8    9    10   11   12
  ---+--------------------------------------------------------------
   0 |    1    3    7    9   13   15   21    25   31    33   37   43
   1 |    2    4    2    4    2    6    4     6    2     4    6    6
   2 |    2   -2    2   -2    4   -2    2    -4    2     2    0   -4
   3 |   -4    4   -4    6   -6    4   -6     6    0    -2   -4   14
   4 |    8   -8   10  -12   10  -10   12    -6   -2    -2   18  -32
   5 |  -16   18  -22   22  -20   22  -18     4    0    20  -50   56
   6 |   34  -40   44  -42   42  -40   22    -4   20   -70  106  -82
   7 |  -74   84  -86   84  -82   62  -26    24  -90   176 -188  102
   8 |  158 -170  170 -166  144  -88   50  -114  266  -364  290 -100
   9 | -328  340 -336  310 -232  138 -164   380 -630   654 -390   50
  10 |  668 -676  646 -542  370 -302  544 -1010 1284 -1044  440   78
		

Crossrefs

Cf. A000959 (row n = 0), A031883 (row n = 1), A123593 (column k = 1).
Cf. A254967 (absolute differences), A095195 (iterated differences of primes), A350004 (iterated differences of ludic numbers).

Formula

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

A229061 The (n+1)-th term of the n-th differences of the prime sequence.

Original entry on oeis.org

2, 2, 2, 4, 8, -2, -48, -70, 0, 56, 308, 1014, 798, -2072, -5126, -2820, 434, -1340, 62902, 398032, 1247046, 2834160, 5266626, 7862442, 9510040, 13829302, 37650208, 111410394, 260524940, 468110450, 626899146, 481007522, -490911164, -3217336656, -8570944960
Offset: 0

Views

Author

Jean-François Alcover, Sep 17 2013

Keywords

Comments

All terms are even. The only zero seems to be a(8), corresponding to A036269(9).

Examples

			The sequences of differences begin:
2,      3,   5,   7,  11,  13,   17,  19,  23,  29, ...
1,      2,   2,   4,   2,   4,    2,   4,   6,   2, ...
1,      0,   2,  -2,   2,  -2,    2,   2,  -4,   4, ...
-1,     2,  -4,   4,  -4,   4,    0,  -6,   8,  -6, ...
3,     -6,   8,  -8,   8,  -4,   -6,  14, -14,   6, ...
-9,    14, -16,  16, -12,  -2,   20, -28,  20,  -2, ...
23,   -30,  32, -28,  10,  22,  -48,  48, -22,  -6, ...
-53,   62, -60,  38,  12, -70,   96, -70,  16,  16, ...
115, -122,  98, -26, -82, 166, -166,  86,   0, -28, ...
etc.
Main diagonal begins:
2, 2, 2, 4, 8, -2, -48, -70, 0, 56, ... .
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(k=0, ithprime(n), T(n+1, k-1)-T(n, k-1))
        end:
    a:= n-> T(n+1, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 25 2013
  • Mathematica
    max = 100; row[n_] := Differences[Prime /@ Range[max], n]; Table[row[n], {n, 0, max}] // Diagonal

Formula

a(n) = A095195(2*n+1,n).

A379542 Second term of the n-th differences of the prime numbers.

Original entry on oeis.org

3, 2, 0, 2, -6, 14, -30, 62, -122, 220, -344, 412, -176, -944, 4112, -11414, 26254, -53724, 100710, -175034, 281660, -410896, 506846, -391550, -401486, 2962260, -9621128, 24977308, -57407998, 120867310, -236098336, 428880422, -719991244, 1096219280
Offset: 0

Views

Author

Gus Wiseman, Jan 12 2025

Keywords

Comments

Also the inverse zero-based binomial transform of the odd prime numbers.

Crossrefs

For all primes (not just odd) we have A007442.
Including 1 in the primes gives A030016.
Column n=2 of A095195.
The version for partitions is A320590 (first column A281425), see A175804, A053445.
For nonprime instead of prime we have A377036, see A377034-A377037.
Arrays of differences: A095195, A376682, A377033, A377038, A377046, A377051.
A000040 lists the primes, differences A001223, A036263.
A002808 lists the composite numbers, differences A073783, A073445.
A008578 lists the noncomposite numbers, differences A075526.

Programs

  • Mathematica
    nn=40;Table[Differences[Prime[Range[nn+2]],n][[2]],{n,0,nn}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * prime(k+2)); \\ Michel Marcus, Jan 12 2025

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * prime(k+2).
Previous Showing 31-34 of 34 results.