A222007 a(n+1) is the smallest prime factor of any (Product_{k=1..j} a(k)) + (Product_{k=j+1..n} a(k)) for j=0..n.
2, 3, 5, 11, 41, 7, 23, 17, 19, 13, 37, 53, 73, 151, 29, 43, 31, 59, 71, 47, 79, 61, 107, 83, 103, 163, 109, 89, 101, 113, 67, 97, 137, 131, 139, 127, 229, 149, 173, 227, 179, 239, 181, 191, 193, 167, 197, 241, 277, 157, 233, 211, 397, 257, 271, 283, 251, 281, 313, 269, 347, 349, 317, 263, 379, 223, 367, 199, 353, 401, 421, 463, 293, 337, 383, 389, 331, 431, 359, 443
Offset: 1
Examples
For n=4, a = <2,3,5>, yielding sums <1+2*3*5, 2+3*5, 2*3+5, 2*3*5+1> = <31,17,11,31>, with least prime factor a(4)=11.
Crossrefs
A modification of A000945, the Euclid-Mullin sequence, which looks only at factors from the j=n term.
Programs
-
PARI
prodsum(ls) = local(left=1, right=prod(x=1,#ls,ls[x]), o=vector(#ls)); for(x=1,#ls,left*=ls[x];right/=ls[x];o[x]=left+right);o newlpf(v) = local(l=0, fs); for(x=1,#v,fs=factor(v[x],if(l>500000,0,l));if(!l||fs[1,1]