OFFSET
1,1
COMMENTS
There are no runs of 7 consecutive odd numbers with this property, since in every run of 7 consecutive odd numbers one is divisible by 7 which is not a prime-indexed prime.
Are there such runs of 5 consecutive odd numbers? There are none below 6.6*10^7.
EXAMPLE
121 = 11^2 is a term since 123 = 3 * 41, 125 = 5^3, and 3 = prime(2), 5 = prime(3), 11 = prime(5), 41 = prime(13) and 127 = prime(31) are all prime-indexed primes.
MATHEMATICA
q[n_] := AllTrue[FactorInteger[n][[;; , 1]], PrimeQ[PrimePi[#]] &]; q[1] = True; v = q /@ {1, 3, 5, 7}; seq = {}; Do[If[And @@ v, AppendTo[seq, k - 8]]; v = Join[Rest[v], {q[k]}], {k, 9, 10^6, 2}]; seq
PROG
(PARI) is(n) = {my(p = factor(n)[, 1]); for(i = 1, #p, if(!isprime(primepi(p[i])), return(0))); return(1)};
v = vector(4); forstep(k = 3, 9, 2, v[(k-1)/2] = is(k));
forstep(k=11, 1e8, 2, q = is(k); v = concat(vecextract(v, "^1"), q); if(v[1]&&v[2]&&v[3]&&v[4], print1(k-6, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Sep 16 2022
STATUS
approved