login
Euclid-Mullin sequence (A000945) with initial value a(1)=257 instead of a(1)=2.
1

%I #25 Oct 12 2023 03:13:34

%S 257,2,5,3,11,84811,31,7,1560842137471,20113,17,83,47,339491,7814561,

%T 109,2897,16103,70921439,199,1381,34987489236924545883729121,43,241,

%U 37,491,28468486915378661,8803,29,25212511,2311,67,3929,1151,192697,797,157,23,1489,13

%N Euclid-Mullin sequence (A000945) with initial value a(1)=257 instead of a(1)=2.

%H Tyler Busby, <a href="/A051333/b051333.txt">Table of n, a(n) for n = 1..44</a>

%t a[1]=257; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]

%o (PARI) spf(n)=my(f=factor(n)[1, 1]); f \\ A020639

%o first(m)=my(v=vector(m)); v[1]=257; for(i=2, m, v[i]=spf(1+prod(j=1, i-1, v[j]))); v \\ _Anders Hellström_, Dec 07 2015

%Y Cf. A020639, A000945, A000946, A005265, A005266.

%K nonn

%O 1,1

%A _Labos Elemer_

%E a(22)-a(27) from _Robert Price_, Jul 09 2015

%E a(28)-a(40) from _Tyler Busby_, Oct 12 2023