login
A373631
Least prime p that for some integer k there exist at least n positive primes of the form q!-p for n consecutive integers q belonging to {k,k+1,k+2,...,k+n-1}.
2
3, 7, 11, 17, 191
OFFSET
1,1
COMMENTS
15000 < a(6) <= 50377, a(7) <= 92761, a(8) <= 2085737, a(9) <= 30357947, a(10) <= 1165922581, a(11) <= 8547418259, a(12) <= 35368198867.
EXAMPLE
{3}! - 3 is a prime.
{4,5}! - 7 are primes.
{4,5,6}! - 11 are primes.
{9,10,11,12}! - 17 are primes.
{22,23,24,25,26}! - 191 are primes.
{12,13,14,15,16,17}! - 50377 are primes.
{11,12,13,14,15,16,17}! - 92761 are primes.
{10,12,13,14,15,16,17}! - 2085737 are primes.
{11,12,13,14,15,16,17,18,19}! - 30357947 are primes.
{16,17,18,19,20,21,22,23,24,25}! - 1165922581 are primes.
{14,15,16,17,18,19,20,21,22,23,24}! - 8547418259 are primes.
{15,16,17,18,19,20,21,22,23,24,25,26}! - 35368198867 are primes.
a(4) = 17 because there exist 4 consecutive integers q belong to {9,10,11,12} such that the numbers q!-17 are all positive primes.
MATHEMATICA
t[n_] :=
Module[{m = 0, s = {}},
For[k = 1, k < n, k++, If[k! > n && PrimeQ[k! - n], m++;
AppendTo[s, k]; ]]; {Length@s, n, s,
Minus[Subtract @@@ Partition[s, 2, 1]]}];
a[n_] :=
If[n == 1, 3, For[r = 1, r <= 10^5, r++, s = Prime@r; v = t[s];
If[v[[1]] > 0 && SequenceCount[v[[4]], PadLeft[{}, n - 1, 1]] > 0,
Return[v[[2]]]; ]]]
Table[a[n], {n, 7}]
CROSSREFS
Cf. A373661.
Sequence in context: A072456 A138659 A020590 * A063437 A363359 A190711
KEYWORD
nonn,hard,more
AUTHOR
Zhining Yang, Jun 11 2024
STATUS
approved