%I #45 Nov 02 2023 14:19:19
%S 2,3,7,43,13,3263443,547,29881,5295435634831,181,2287,73
%N Smallest prime divisor of A000058(n) = A007018(n) + 1 (Sylvester's sequence).
%C a(n) is also the smallest prime divisor of A007018(n+1) that is not a divisor of A007018(n).
%C The prime numbers a(n) are all distinct, which proves the infinitude of the prime numbers (Saidak's proof).
%C a(12) <= 2589377038614498251653. - _Daniel Suteu_, Jan 20 2019
%C a(12)..a(50) = [?, 52387, 13999, 17881, 128551, 635263, ?, ?, 352867, 387347773, ?, 74587, ?, ?, 27061, 164299, 20929, 1171, ?, 1679143, ?, ?, 120823, 2408563, 38218903, 333457, 30241, 4219, 1085443, 7603, 1861, ?, 23773, 51769, 1285540933, 429547, ?, 8323570543, ?], where ? denote unknown values > 10^10. - _Max Alekseyev_, Oct 11 2023
%H Filip Saidak, <a href="http://dx.doi.org/10.2307/27642094">A new proof of Euclid's theorem</a>, Amer. Math. Monthly, 113:10 (2006) 937-938.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Sylvester%27s_sequence#Divisibility_and_factorizations">Sylvester's sequence: Divisibility and factorizations</a>.
%F a(n) = A007996(m), where m is the smallest index such that A180871(m) = n. - _Max Alekseyev_, Oct 11 2023
%p with(numtheory):
%p u:=1: P:=NULL: to 9 do P:=P,sort([op(divisors(u+1))])[2]: u:=u*(u+1) od:
%p P;
%o (PARI) f(n)=if(n<1, n>=0, f(n-1)+f(n-1)^2); \\ A007018
%o a(n)=divisors(f(n)+1)[2]; \\ _Michel Marcus_, Jan 20 2019
%Y Cf. A007018, A000058, A007996, A091335, A180871.
%K nonn,more
%O 0,1
%A _Robert FERREOL_, Jan 19 2019
%E a(10)-a(11) from _Daniel Suteu_, Jan 20 2019