%I #41 Jul 07 2024 04:46:19
%S 2,5,13,13,151,29,5167,541,51913,691,39918847,1520653,9631,2748457,
%T 171793,37698720637,429056005099,10201231,4759011791767,26573,
%U 560275276313059,30130171848761,522781919969,8912567718641664241,480631246386037,3215985920374841,4561301027
%N Largest prime factor of n! + 2^n - 1.
%C A186450 is a subsequence. - _Altug Alkan_, Oct 28 2015
%H Kevin P. Thompson, <a href="/A127987/b127987.txt">Table of n, a(n) for n = 1..106</a> (terms 1..75 from Klaus Brockhaus, terms 76..81 from Amiram Eldar)
%H Florian Luca and Igor E. Shparlinsky, <a href="http://dx.doi.org/10.5802/jtnb.524">On the largest prime factor of n! + 2^n - 1</a>, J. Th. des Nombres de Bordeaux 2005, Vol.17, Fasc. 3.
%F a(n) = A006530(A127986(n)). - _Amiram Eldar_, Feb 05 2020
%e a(6) = 29 since 29 is the largest prime factor of n! + 2^n - 1 = 6! + 2^6 - 1 = 783 = 3^3 * 29.
%t Table[FactorInteger[n! + 2^n - 1][[-1, 1]], {n, 20}] (* _Alonso del Arte_, Oct 28 2015 *)
%o (Magma) largestpf := func<n | f[#f, 1] where f is Factorization(n)>; [largestpf(Factorial(n)+2^n-1): n in [1..24]]; // _Klaus Brockhaus_, Nov 20 2009
%o (PARI) a(n)=my(f=factor(n!+2^n-1)[,1]);f[#f] \\ _Charles R Greathouse IV_, Feb 01 2013
%Y Cf. A006530, A127986.
%K nonn
%O 1,1
%A _Artur Jasinski_, Feb 09 2007
%E Definition corrected by _Artur Jasinski_, Apr 22 2008