OFFSET
1,1
COMMENTS
Is this sequence infinite?
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..500
MATHEMATICA
fa = FactorInteger; is[2, p_] = True; is[2, p_];
is[n_, p_] := PrimeQ[n] && MoebiusMu[n - 1] ≠ 0 && Union@Table[is[fa[n - 1][[i, 1]], p] || fa[n - 1][[ i, 1]] == p , {i, Length[fa[n - 1]]}] == {True}; Select[Prime[Range[100000]], is[#, 13] &]
PROG
(PARI)
leastdiv(v, pred, inf)={ \\ finds least divisor d satisfying pred(d) && d>=inf
my(recurse(k, d, lim)= if(d >= lim, lim, if(d>=inf && pred(d), d, k++; if(k<=#v, lim=self()(k, d*v[k], lim); self()(k, d, lim), lim))));
my(stop=vecprod(v), lim=inf, m=4);
while(lim<=stop, lim*=m; my(d=recurse(0, 1, lim)); if(d<lim, return(d), m*=4*sqrtint(m))); oo;
}
lista(n, S=[13])={my(t=2); print1(t, ", "); for(i=2, n, S=concat(S, [t]); t=leastdiv(S, d->isprime(d+1), S[#S]); if(t==oo, break); t++; print1(t, ", "))} \\ Andrew Howroyd, Nov 13 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Jan 16 2016
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Nov 13 2018
STATUS
approved