OFFSET
1,2
COMMENTS
There are no 3 consecutive integers that are products of primes of nonprime index since 1 out of 3 consecutive integers is divisible by 3 which is a prime-indexed prime (A006450).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
7 = prime(4) is a term since 4 is nonprime, 7 + 1 = 8 = prime(1)^3, and 1 is also nonprime.
MATHEMATICA
q[n_] := AllTrue[FactorInteger[n][[;; , 1]], ! PrimeQ[PrimePi[#]] &]; seq = {}; q1 = q[1]; n = 2; c = 0; While[c < 55, q2 = q[n]; If[q1 && q2, c++; AppendTo[seq, n - 1]]; q1 = q2; n++]; seq
PROG
(PARI) is(n) = {my(p = factor(n)[, 1]); for(i = 1, #p, if(isprime(primepi(p[i])), return(0))); 1; }
lista(nmax) = {my(q1 = is(1), q2); for(n = 2, nmax, q2 = is(n); if(q1 && q2, print1(n-1, ", ")); q1 = q2); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Feb 04 2023
STATUS
approved