OFFSET
1,1
COMMENTS
If n is a term, any power of n is also a term. Also all primes are terms. - Zak Seidov, Jun 25 2015
LINKS
Harry J. Smith and Robert Israel, Table of n, a(n) for n = 1..10000 (1..1000 from Harry J. Smith)
EXAMPLE
35 is included because 35 = 5 * 7 and 5 and 7 are consecutive primes.
MAPLE
select((numtheory:-pi @ max - numtheory:-pi @ min - nops) @ numtheory:-factorset = -1, [$2..1000]); # Robert Israel, Jun 25 2015
MATHEMATICA
fi[n_]:=FactorInteger[n]; Select[Range[2, 5903], PrimeQ[#]||Length[fi[#]] < 2 ||Union[Differences[PrimePi[#[[1]]&/@fi[#]]]]=={1}&]
(* For first 1000 terms. - Zak Seidov, Jun 25 2015 *)
PROG
(PARI) { n=0; for (m=2, 10^9, f=factor(m); b=1; for (i=2, matsize(f)[1], if (primepi(f[i, 1]) - primepi(f[i - 1, 1]) > 1, b=0; break)); if (b, write("b066311.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Feb 10 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 01 2002
EXTENSIONS
Offset changed from 0 to 1 by Harry J. Smith, Feb 10 2010
STATUS
approved