OFFSET
1,1
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ n. In particular there are x - 200x log log x/log x + O(x/log x) members of this sequence below x. - Charles R Greathouse IV, Dec 11 2012
EXAMPLE
a(1) = 104 because the decade (1030..1039) has the same semiprime pattern as the previous decade: (1020..1029), namely that each has only a single semiprime, respectively 1027 = 13 * 79 and 1037 = 17 * 61. [corrected by Bobby Jacobs, Sep 28 2016]
MATHEMATICA
SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nn = 50000; s = Table[SemiPrimeQ[n], {n, nn}]; t = Partition[s, 10]; t2 = {}; Do[If[t[[i]] == t[[i - 1]], AppendTo[t2, i]], {i, 2, Length[t]}]; t2 (* T. D. Noe, Dec 11 2012 *)
semiPrimeQ[n_] := PrimeOmega@ n == 2; f[n_] := semiPrimeQ@# & /@ (10 n + Range@9); a = f[0]; k = 1; lst = {}; While[k < 10001, b = f[k]; If[a == b, AppendTo[lst, k]]; a = b; k++]; lst (* Robert G. Wilson v, Dec 11 2012 *)
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Jonathan Vos Post, Dec 10 2012
EXTENSIONS
All terms from T. D. Noe, Dec 11 2012, and (with 1 already added to each) all terms after the first from Robert G. Wilson v, by email to Jonathan Vos Post.
STATUS
approved