%I #23 Oct 08 2021 19:03:26
%S 3,7,31,211,2311,59,19,347,317,331,200560490131,181,61,167,953,73,277,
%T 223,54730729297,1063,2521,22093,265739,131,2336993,960703,2297,149,
%U 334507,5122427,1543,1951,881,678279959005528882498681487,87549524399,23269086799180847
%N Smallest prime factor of 1 + (product of first n primes).
%C Based on Euclid's proof that there are infinitely many primes.
%H Amiram Eldar, <a href="/A051342/b051342.txt">Table of n, a(n) for n = 1..87</a>
%H M. Kraitchik, <a href="/A002582/a002582.pdf">On the divisibility of factorials</a>, Scripta Math., 14 (1948), 24-26 (but beware errors). [Annotated scanned copy]
%H Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha102.htm">Factorizations of many number sequences</a>
%H Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha103.htm">Factorizations of many number sequences</a>
%H R. G. Wilson v, <a href="/A038507/a038507.txt">Explicit factorizations</a>
%F a(n) = A020639(1+A002110(n)).
%p a:= proc(n)
%p local N, F, i;
%p N:= 1 + mul(ithprime(i),i=1..n);
%p F:= select(type,map(t->t[1],ifactors(N,easy)[2]),integer);
%p if nops(F) >= 1 then return min(F) fi;
%p min(map(t->t[1],ifactors(N)[2]))
%p end proc:
%p seq(a(n),n=1..40); # _Robert Israel_, Oct 19 2014
%t Map[FactorInteger,
%t Table[Product[Prime[n], {n, 1, m}] + 1, {m, 1, 36}]][[All,
%t 1]][[All, 1]] (* _Geoffrey Critzer_, Oct 19 2014 *)
%t FactorInteger[#][[1,1]]&/@(FoldList[Times,Prime[Range[40]]]+1) (* _Harvey P. Dale_, Oct 08 2021 *)
%o (PARI) a(n) = factor(1 + prod(i=1, n, prime(i)))[1, 1]; \\ _Michel Marcus_, Dec 10 2013
%Y Cf. A014545, A002585.
%K nonn
%O 1,1
%A _Labos Elemer_
%E One more term from _Michel Marcus_, Dec 10 2013