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.

A215231 Increasing gaps between semiprimes.

This page as a plain text file.
%I A215231 #20 Mar 24 2014 09:26:39
%S A215231 2,3,4,6,7,11,14,19,20,24,25,28,30,32,38,47,54,55,70,74,76,82,85,87,
%T A215231 88,95,98,107,110,112,120,123,126,146,163,166,171,174
%N A215231 Increasing gaps between semiprimes.
%C A215231 See A215232 and A217851 for the semiprimes that begin and end the gaps.
%C A215231 Records in A065516. - _R. J. Mathar_, Aug 09 2012
%C A215231 How long can these gaps be? In the Cramér model, with x = A215232(n), they are of length log(x)^2/log(log(x))(1 + o(1)) with probability 1. - _Charles R Greathouse IV_, Sep 07 2012
%C A215231 a(n) = A065516(A085809(n)). - _Reinhard Zumkeller_, Mar 23 2014
%e A215231 4 is here because the difference between 10 and 14 is 4, and there is no smaller semiprimes with this property.
%t A215231 SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nextSemiprime[n_] := Module[{m = n + 1}, While[! SemiPrimeQ[m], m++]; m]; t = {{0, 0}}; s1 = nextSemiprime[1]; While[s1 < 10^7, s2 = nextSemiprime[s1]; d = s2 - s1; If[d > t[[-1, 1]], AppendTo[t, {d, s1}]; Print[{d, s1}]]; s1 = s2]; t = Rest[t]; Transpose[t][[1]]
%o A215231 (Haskell)
%o A215231 a215231 n = a215231_list !! (n-1)
%o A215231 (a215231_list, a085809_list) = unzip $ (2, 1) : f 1 2 a065516_list where
%o A215231    f i v (q:qs) | q > v = (q, i) : f (i + 1) q qs
%o A215231                 | otherwise = f (i + 1) v qs
%o A215231 -- _Reinhard Zumkeller_, Mar 23 2014
%Y A215231 Cf. A001358 (semiprimes), A131109, A215232, A217851.
%Y A215231 Cf. A005250 (increasing gaps between primes).
%Y A215231 Cf. A239673 (increasing gaps between sphenic numbers).
%K A215231 nonn,hard,more
%O A215231 1,1
%A A215231 _T. D. Noe_, Aug 07 2012
%E A215231 a(27)-a(31) from _Donovan Johnson_, Aug 07 2012
%E A215231 a(32)-a(38) from _Donovan Johnson_, Sep 20 2012