login
a(n) is the smallest number k that is divisible by all numbers d with d < p = prime(n), and such that all of k+1, k-1, k+p, k-p are prime.
1

%I #42 Nov 07 2023 11:40:05

%S 12,60,93240,2383920,298378080,5133688560,73329656400,2168462696400,

%T 1215784751781600,150901712773812000,133573286426580000,

%U 657837749787992373600,10597036678652724300000,2761248653283183065402400,2053281233421697855815439200

%N a(n) is the smallest number k that is divisible by all numbers d with d < p = prime(n), and such that all of k+1, k-1, k+p, k-p are prime.

%C Suggested by _Charles Kusniec_ on the mersenneforum.org message board (see "Links" section): a number c(n) = k(n) + r(n), where k(n) = m * A099795(n), r(n) = {-1, 1, p, -p} and p = prime(n), is not divisible by any d with d < p and the density of primes among c(n) is expected to be higher than for random numbers of that magnitude.

%C The probability that an arbitrary c(n) is prime is higher than that of an arbitrary number of the same magnitude. Let t(n) denote that probability, then t(n) = 1/(((1/2)*(2/3)*(4/5)*(6/7)*...*(prime(n-1)-1)/prime(n-1)) * log(c(n))). According to Mertens's third theorem the value asymptotically approaches 1/((e^gamma/log(prime(n-1))) * log(c(n))). log(c(n)) can be approximated as prime(n-1). This yields t(n) ~ log(prime(n-1))/(e^gamma*prime(n-1)). The probability that c(n) is prime for a random value of m is t(n)^4. Thus, the sequence is expected to grow with (prime(n-1)/log(prime(n-1))^4*A099795(n). For n < 201 the arithmetic mean of m(n)*t(n)^4 is 1.1. - _Florian Baur_, Jul 12 2023

%C For all n < 171, a(n) > a(n-1) with the exception of a(11) < a(10). This occurs whenever m(n-1) > prime(n) * m(n).

%C The principle can be extended to r(n,i) = {-1,1,-p,p,-q_i,q_i} where q_i = prime(n+i). Such a sequence b for i = 1 would have b(3) = 12, as 5, 7, 11, 13, 17, 19 are all prime. This is the only number k for which all three of k+-1, k+-5, and k+-7 are prime. To satisfy the first requirement for k > 6, we need k == {0, 2, 8} (mod 10). Under this condition, one of k-5 or k+-7 will be divisible by 5. Since 12 - 7 = 5 is the only prime that is divisible by 5, k = 12 is the only k satisfying the condition.

%C If q, with a(n) + 1 < q < a(n) + prime(n)^2, is prime, the difference r(n) = q - a(n) is also prime. Proof: Per definition a(n) is divisible by all d < prime(n). It follows that, if r is divisible by any d, then so is q = a(n) + r, whence q is not prime. Thus, if q is prime, then r is either also prime or only has prime factors f >= prime(n), i.e., r >= prime(n)^2. See "Fortunate Numbers" (A005235).

%C There is no a(1) and a(2). Since prime(1) = 2, both k+1 and k+2 need to be prime. This is only true for k = 1, but 1 - 1 = 0 is not prime. For a(2) we have prime(2) = 3 and one of k+1, k-1, k+3 is divisible by 3.

%H Florian Baur, <a href="/A354882/b354882.txt">Table of n, a(n) for n = 3..200</a>

%H Charles Kusniec, <a href="https://mersenneforum.org/showthread.php?t=27328">An idea for a new class of some numbers</a>, mersenneforum.org

%F a(n) = m(n) * A099795(n). Specifically, m(3) = m(4) = 1. For all other n < 201, 25 < m(n) < 333054037 and m(n) cannot have prime(n) as a factor. - _Florian Baur_, Jul 12 2023

%e a(3): The 3rd prime is 5. The smallest number divisible by all d < 5 is 12. Since 12 - 1 = 11, 12 + 1 = 13, 12 + 5 = 17, 12 - 5 = 7 are all prime, a(3) = 12.

%e a(5): The 5th prime is 11. The smallest number divisible by all d < 11 is 2520. However, 2520 - 1 = 2519 is not prime. The smallest number satisfying all conditions is 93240, since 93240 - 1, 93240 + 1, 93240 + 11, 93240 - 11 are all prime and 93240 is divisible by all d < 11. Thus, a(5) = 93240.

%o (PARI) A354882(n) = { my(s = 1, p = prime(n), c = lcm([1..p-1])); while(!(isprime(s*c+1) & isprime(s*c-1) & isprime(s*c+p) & isprime(s*c-p)), s++); return(s*c)} \\ _Florian Baur_, Jul 17 2023

%K nonn

%O 3,1

%A _Florian Baur_, Jun 10 2022