OFFSET
1,1
COMMENTS
a(n) is the least prime of the form Product_{k=i..i+2*n-1} prime(k) - Sum_{k=i..i+2*n-1} prime(k).
LINKS
Robert Israel, Table of n, a(n) for n = 1..115
EXAMPLE
a(1) = 7 because 7 = 3*5 - (3+5) is prime where 3 and 5 are two consecutive primes, while 2*3 - (2+3) = 1 is not prime.
MAPLE
f:= proc(n) local L, i, v;
L:= [seq(ithprime(i), i=1..2*n)]:
do
v:= convert(L, `*`)-convert(L, `+`);
if isprime(v) then return(v) fi;
L:= [seq(L[i], i=2..2*n), nextprime(L[2*n])]
od:
end proc:
map(f, [$1..12]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Will Gosnell and Robert Israel, Nov 24 2025
STATUS
approved
