%I #39 Sep 08 2022 08:46:18
%S 2,2,5,37,577,14401,13,101,17,131681894401,13168189440001,
%T 1593350922240001,101,38775788043632640001,29,1344169,149,9049,37,
%U 710341,41,61,337,509,384956219213331276939737002152967117209600000001,941
%N Smallest prime factor of A020549(n) = (n!)^2 + 1.
%C By construction, for n >= 2, a(n) == 1 (mod 4) and a(n) > n.
%C From _Robert Israel_, Mar 08 2017: (Start)
%C a(n) = A020549(n) for n in A046029.
%C a(n) <= 2*n+1 if n is in A104636.
%C The first member of A104636 for which a(n) < 2*n+1 is 48.
%C a(a(n)-n-1) = a(n). (End)
%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 147.
%H Hugo Pfoertner, <a href="/A282706/b282706.txt">Table of n, a(n) for n = 0..74</a>
%H Apoloniusz Tyszka, <a href="https://philarchive.org/archive/TYSDASv56">On ZFC-formulae phi(x) for which we know a non-negative integer n such that max({x, element of N, phi(x)}) <= n if the set {x, element of N, phi(x)} is finite</a>, 2019.
%H Apoloniusz Tyszka, SÅ‚awomir Kurpaska, <a href="https://philarchive.org/archive/TYSDASv104">Open problems that concern computable sets X, subset of N, and cannot be formally stated as they refer to current knowledge about X</a>, (2020).
%H Andrew Walker, <a href="http://web.archive.org/web/20080808141339/http://www.uow.edu.au/~ajw01/ecm/pluspp.txt">Table of factors of (n!)^2+1</a>.
%p f:= proc(n) local a;
%p a:= min(map(proc(t) if t[1]::integer then t[1] fi end proc, ifactors((n!)^2+1,easy)[2]));
%p if a = infinity then
%p a:= traperror(timelimit(60, min(map(t -> t[1], ifactors((n!)^2+1)[2]))));
%p fi;
%p a
%p end proc:
%p map(f, [$0..36]); # _Robert Israel_, Mar 08 2017
%t Join[{2}, Array[FactorInteger[(#!)^2 + 1][[1, 1]]&, {25}]] (* _Vincenzo Librandi_, Feb 28 2017 *)
%o (Magma) [2] cat [Min(PrimeFactors(Factorial(n)^2 + 1)):n in[1..25]]; // _Vincenzo Librandi_, Feb 28 2017
%Y Cf. A020549, A046029, A083340, A083341, A104636, A282705.
%K nonn
%O 0,1
%A _N. J. A. Sloane_, Feb 26 2017
%E More terms from _Vincenzo Librandi_, Feb 28 2017