OFFSET
1,1
COMMENTS
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.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..300
EXAMPLE
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.
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jonathan Vos Post, Sep 01 2013
STATUS
approved