login
Smallest nonprime that is the n-th prime plus a multiple of the (n-1)-st primorial.
0

%I #13 Mar 23 2024 20:59:00

%S 4,9,35,187,221,2323,120137,1021039,19399403,223092899,6469693261,

%T 200560490167,7420738134851,304250263527253,39248283995010137,

%U 614889782588491463,65178316954380089519,3845520700308425278201,117288381359406970983337,7858321551080267055879161

%N Smallest nonprime that is the n-th prime plus a multiple of the (n-1)-st primorial.

%H Alon Amit, <a href="https://www.quora.com/How-do-you-find-the-smallest-positive-integer-n-so-7-30n-is-not-a-prime-number">How do you find the smallest positive integer n so 7+30n is not a prime number?</a>, Quora, November 22, 2023.

%e For n = 1, the n-th prime (2) plus a multiple m of the (n-1) primorial (1) is 2+m, giving the smallest nonprime, a(1)=4, when m=2.

%e For n = 4, the n-th prime (7) plus a multiple m of the (n-1) primorial (30) is 7+30m, giving the smallest nonprime, a(4)=187, when m=6.

%t a[n_] := Module[{p = Prime[n], r = Product[Prime[i], {i, 1, n - 1}]}, While[p += r; PrimeQ[p]]; p]; Array[a, 20] (* _Amiram Eldar_, Dec 07 2023 *)

%Y Cf. A000040, A002110.

%K nonn

%O 1,1

%A _Don N. Page_, Dec 07 2023