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.

A226943 Semiprimes in the order in which they appear in the decimal expansion of Pi.

This page as a plain text file.
%I A226943 #35 Aug 20 2017 23:19:13
%S A226943 4,14,314,141,15,415,1415,9,159,6,26,926,5926,15926,65,265,2653,92653,
%T A226943 592653,35,535,6535,5926535,58,358,265358,314159265358,589,3589,53589,
%U A226943 2653589,92653589,1592653589,1415926535897,979,5358979,59265358979,159265358979
%N A226943 Semiprimes in the order in which they appear in the decimal expansion of Pi.
%C A226943 This is to semiprimes A001358 as A198019 is to primes A000040. Considering the first 1, 2, 3, 4, ... digits of the decimal expansion 3.14159... of Pi, record the semiprimes that have not occurred earlier, the smaller first if two or more appear by the n-th digit that have not been seen in the first n-1 digits.
%H A226943 Giovanni Resta, <a href="/A226943/b226943.txt">Table of n, a(n) for n = 1..300</a>
%e A226943 There are no semiprimes in the first 1 or 2 digits (3, 31). Then after 3 digits we have three: 4, 14, and 314 appearing for the first time. So a(1) = 4, a(2) = 14 and a(3) = 314.
%t A226943 semiQ[n_] := Total[Last /@ FactorInteger@n ] == 2; sp = Select[Range@ 999, semiQ]; spQ[n_] := If[n < 10^6, semiQ@n, ! Or @@ IntegerQ /@ (n/sp) && semiQ@ n]; seq = {}; Do[seq = Join[seq, Select[Union@ Complement[ Mod[FromDigits@ RealDigits[Pi, 10, n][[1]], 10^Range[n, 1, -1]], seq], spQ]], {n, 30}]; seq (* _Giovanni Resta_, Oct 01 2013 *)
%Y A226943 Cf. A000796, A001358, A198019.
%K A226943 nonn,base
%O A226943 1,1
%A A226943 _Jonathan Vos Post_, Sep 01 2013