login
a(1) = 2, a(2) = 3; for n >= 2, a(n+1) is smallest prime factor of (Product_{k = 1..n} a(k)) - 1.
4

%I #25 Jul 08 2023 11:51:01

%S 2,3,5,29,11,7,13,37,32222189,131,136013303998782209,31,197,19,157,17,

%T 8609,1831129,35977,508326079288931,487,10253,1390043,

%U 18122659735201507243,25319167,9512386441,85577,1031,3650460767,107

%N a(1) = 2, a(2) = 3; for n >= 2, a(n+1) is smallest prime factor of (Product_{k = 1..n} a(k)) - 1.

%C Like the Euclid-Mullin sequence A000945, but subtracting rather than adding 1 to the product.

%C The first 4 terms are identical with A084599. It starts diverging at a(5) because the factorization of 2*3*5*29 - 1 = 869 = 11*79 gives A084598(5)=11 and A084599(5)=79. - _Hugo Pfoertner_, Mar 31 2004

%H Sean A. Irvine added terms 54 through 61, May 21 2006, giving <a href="/A084598/b084598.txt">Table of n, a(n) for n = 1..61</a>

%H Dario Alpern, <a href="https://www.alpertron.com.ar/ECM.HTM">Factorization using the Elliptic Curve Method</a>

%e a(4) = 29 since 2*3*5 = 30 and 29 is the smallest prime factor of 30-1.

%t a={2,3}; q=2;

%t For[n=3,n<=19,n++,

%t q=q*Last[a];

%t AppendTo[a,Min[FactorInteger[q-1][[All,1]]]];

%t ];

%t a (* _Robert Price_, Jul 17 2015 *)

%Y Cf. A000945, A005266, A084598, A084599.

%Y Essentially the same as A005265.

%K nonn

%O 1,1

%A _Marc LeBrun_, May 31 2003

%E More terms from _Hugo Pfoertner_, May 31 2003, using Dario Alpern's ECM