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.

A361744 A(n,k) is the least m such that there are k primes in the set {prime(n) + 2^i | 1 <= i <= m}, or -1 if no such number exists; square array A(n,k), n > 1, k >= 1, read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 3, 3, 2, 4, 5, 4, 1, 6, 11, 6, 3, 2, 7, 47, 8, 5, 4, 1, 12, 53, 10, 7, 8, 13, 2, 15, 141, 16, 9, 20, 21, 6, 3, 16, 143, 18, 15, 38, 33, 30, 7, 1, 18, 191, 20, 23, 64, 81, 162, 39, 3, 4, 28, 273, 28, 29, 80, 129, 654, 79, 5, 12, 2
Offset: 2

Views

Author

Jean-Marc Rebert, Mar 22 2023

Keywords

Examples

			p = prime(2) = 3, m=1, u = {p + 2^k | 1 <= k <= m} = {5} contains one prime, and no lesser m satisfies this, so A(2,1) = 1.
Square array A(n,k) n > 1 and k >= 1 begins:
 1,     2,     3,     4,     6,     7,    12,    15,    16,    18, ...
 1,     3,     5,    11,    47,    53,   141,   143,   191,   273, ...
 2,     4,     6,     8,    10,    16,    18,    20,    28,    30, ...
 1,     3,     5,     7,     9,    15,    23,    29,    31,    55, ...
 2,     4,     8,    20,    38,    64,    80,   292,  1132,  4108, ...
 1,    13,    21,    33,    81,   129,   285,   297,   769,  3381, ...
 2,     6,    30,   162,   654,   714,  1370,  1662,  1722,  2810, ...
 3,     7,    39,    79,   359,   451,  1031,  1039, 11311, 30227, ...
 1,     3,     5,     7,     9,    13,    15,    17,    23,    27, ...
		

Crossrefs

Cf. A057732 (1st row), A094076 (1st column).
Cf. A361679.
Cf. A019434 (primes 2^n+1), A057732 (2^n+3), A059242 (2^n+5), A057195 (2^n+7), A057196(2^n+9), A102633 (2^n+11), A102634 (2^n+13), A057197 (2^n+15), A057200 (2^n+17), A057221 (2^n+19), A057201 (2^n+21), A057203 (2^n+23).
Cf. A205558 and A231232 (with 2*k instead of 2^k).

Programs

  • PARI
    A(n, k)= {my(nb=0, p=prime(n), m=1); while (nb