OFFSET
1,1
COMMENTS
a(n) is the index of zeros in the complement of the semiprime analog of the Baum-Sweet sequence, which is b(n) = 1 if the binary representation of n contains no block of consecutive zeros of exactly semiprime length; otherwise b(n) = 0.
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 157.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
J.-P. Allouche, Finite Automata and Arithmetic, Séminaire Lotharingien de Combinatoire, B30c (1993), 23 pp.
EXAMPLE
a(1) = 16 because 16 (base 2) = 10000, which has a block of 4 zeros, where 4 is a semiprime (A001358(1)).
a(2) = 33 because 33 (base 2) = 100001, which has a block of 4 zeros.
a(3) = 48 because 48 (base 2) = 110000, which has a block of 4 zeros.
a(4) = 64 because 64 (base 2) = 1000000, which has a block of 6 zeros, where 6 is a semiprime (A001358(2)).
512 is in this sequence because 512 (base 2) = 1000000000, which has a block of 9 zeros, where 9 is a semiprime (A001358(3)).
MATHEMATICA
f[n_] := If[Or @@ (First[ # ] == 0 && Plus @@ Last /@ FactorInteger[Length[ # ]] == 2 &) /@ Split[IntegerDigits[n, 2]], 0, 1]; Select[Range[450], f[ # ] == 0 &] (* Ray Chandler, Sep 16 2005 *)
Select[Range[500], AnyTrue[Length/@Select[Split[IntegerDigits[#, 2]], #[[1]] == 0&], PrimeOmega[#]==2&]&] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 05 2018 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Sep 08 2005
EXTENSIONS
Extended by Ray Chandler, Sep 16 2005
STATUS
approved