cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A214520 Primes that are the only prime between consecutive semiprimes.

This page as a plain text file.
%I A214520 #10 Mar 04 2019 17:19:56
%S A214520 5,7,23,37,47,53,67,79,83,89,113,127,131,157,163,167,173,211,223,251,
%T A214520 257,263,277,293,307,317,331,337,359,367,373,379,383,389,397,401,409,
%U A214520 449,457,467,479,487,491,499,503,509,541,547,557,563,577,587,593,613,631
%N A214520 Primes that are the only prime between consecutive semiprimes.
%H A214520 T. D. Noe, <a href="/A214520/b214520.txt">Table of n, a(n) for n = 1..10000</a>
%e A214520 23 is the only prime between semiprimes 22 and 25.
%t A214520 SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; t = Select[Range[1000], SemiPrimeQ[#] &]; t2 = Select[Range[Length[t] - 1], PrimePi[t[[# + 1]]] - PrimePi[t[[#]]] == 1 &]; NextPrime[t[[t2]]]
%t A214520 Transpose[Select[{NextPrime[#[[1]]],NextPrime[#[[2]],-1]}&/@ Partition[ Select[ Range[700],PrimeOmega[#]==2&],2,1],Length[Union[#]]==1&]][[1]] (* _Harvey P. Dale_, Sep 01 2015 *)
%o A214520 (Perl) use ntheory ":all"; my($i,$l)=(0,4); forsemiprimes { my $n=next_prime($l); print ++$i," $n\n" if $n < $_ && next_prime($n) > $_; $l=$_;} 6,257; # _Dana Jacobsen_, Mar 04 2019
%Y A214520 Cf. A001358 (semiprimes).
%Y A214520 Cf. A088701 (n primes between semiprimes).
%K A214520 nonn
%O A214520 1,1
%A A214520 _T. D. Noe_, Aug 06 2012