OFFSET
1,1
COMMENTS
If gpf is replaced by spf, the two sequences diverge at a(40) (here 193, equal to 191 if spf is used instead). - Giovanni Resta, Aug 14 2015
Among the first 1000 terms, a(n+1) is always the least prime > a(n) except for n = 1, 3, 17, 39, 151 and 422, where a(n+1) = nextprime(a(n)) + 2 except for n = 151 (nextprime = A151800). - M. F. Hasler, Aug 17 2015
Primes not present in sequence: 3, 11, 71, 191, 911, 2969, 9103, 55871, 313583, ... - Robert G. Wilson v, Aug 17 2015
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
MATHEMATICA
gpfQ[x_, p_] := Mod[x, p] == 0 && Block[{n = x / p^IntegerExponent[x, p], f = 2}, While[f < p && n > 1, n /= f^IntegerExponent[n, f]; f = NextPrime@f]; n == 1]; bad[v_, p_] := Catch[Do[If[gpfQ[e + 1, p], Throw@ True], {e, v}]; False]; L = {2}; pr = {2}; While[Length[L] < 100, p = NextPrime@ L[[-1]]; While[bad[pr, p], p = NextPrime@p]; AppendTo[L, p]; AppendTo[pr, p Last@ pr]]; L (* Giovanni Resta, Aug 14 2015 *)
PROG
(PARI) vecprod1(v, n)=prod(i=1, n, v[i]);
gpf(n)=my(f=factor(n)[, 1]~); f[#f];
is_ok(w, n)=my(x=1); for(i=1, #w, if(prime(n)==gpf(1+vecprod1(w, i)), x=0; break)); x;
get_next(v, p)=until(is_ok(v, p ), p++); p;
first(m)={my(v=[], p=1); v=concat(v, prime(1)); p++; for(i=2, m, p=get_next(v, p); v=concat(v, prime(p)); ); v; }
(PARI) A261123(N, v=[2], f=[])={while(#v<N, f=setunion(f, factor(prod(i=1, #v, v[i])+1, 0)[, 1][-1..-1]~); forprime(p=v[#v]+1, , if(!setsearch(f, p), v=concat(v, p); break))); v} \\ M. F. Hasler, Aug 17 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Anders Hellström, Aug 09 2015
EXTENSIONS
a(51)-a(57) from Giovanni Resta, Aug 14 2015
STATUS
approved