A051335 Euclid-Mullin sequence (A000945) with initial value a(1)=127 instead of a(1)=2.
127, 2, 3, 7, 5, 149, 19, 41, 23899, 139, 43, 761, 281, 17, 53, 2551, 23, 20149, 100720363856036298033578901613089271, 31, 179, 11, 13, 523, 282995646721, 2871347, 83, 10744429, 1031, 427773048135533, 97, 78506876242349, 67
Offset: 1
Links
- Robert Price, Table of n, a(n) for n = 1..47
Programs
-
Mathematica
a[1]=127; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]
-
PARI
spf(n)=my(f=factor(n)[1,1]);f; first(m)={my(v=vector(m)); v[1]=127; for(i=2, m, v[i]=spf(1+prod(j=1, i-1, v[j]))); v;} /* Anders Hellström, Aug 18 2015 */