A051311 Euclid-Mullin sequence (A000945) with initial value a(1)=17 instead of a(1)=2.
17, 2, 5, 3, 7, 3571, 31, 395202571, 13, 29, 137, 23, 97, 1896893, 34138453466895150823580146142491, 4639, 61, 181, 43, 19, 11, 59, 25292522503108044617, 4909, 18305191, 467
Offset: 1
Keywords
Links
- Robert Price, Table of n, a(n) for n = 1..30
Programs
-
Mathematica
a[1]=17; a[n_] := First[ Flatten[ FactorInteger[ 1+Product[ a[ j ], {j, 1, n-1} ] ] ] ]; Array[a, 10]
-
PARI
spf(n)=factor(n)[1,1] first(m)=my(v=vector(m)); v[1]=17; for(i=2, m, v[i]=spf(1+prod(j=1, i-1, v[j]))); v; \\ Anders Hellström, Aug 22 2015