login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213087 Concatenate the binary representations of the nonnegative integers and form successive terms by inserting a comma after each zero. 1
0, 110, 1110, 0, 10, 1110, 11110, 0, 0, 10, 0, 110, 10, 10, 11110, 0, 110, 11110, 111110, 0, 0, 0, 10, 0, 0, 110, 0, 10, 10, 0, 1110, 10, 0, 10, 10, 110, 110, 10, 111110, 0, 0, 110, 0, 1110, 10, 110, 111110, 0, 1110, 111110, 1111110, 0, 0, 0, 0, 10, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence has the same property as A209355, namely, each term in this sequence occurs infinitely often in runs of every finite length >= 1. This sequence, however, contains an infinite number of distinct terms, the same digit strings as occur uniquely and sorted in A105279.
LINKS
EXAMPLE
The binary representations of 0, 1, 2, 3, 4 are 0, 1, 10, 11, 100, so concatenation gives 011011100, which, when commas are inserted after each zero, produces 0, 110, 1110, 0, terms a(1) through a(4).
PROG
(PARI)
/* Calculate terms_wanted terms starting with n: Binary values*/
/* of n, n + 1, n + 2, ..., are concatenated and each term is */
/* the string of all bits up to and including the next zero. */
/* (Note: Behavior of PARI binary function is such that if */
/* n < 0 is used, binary values of |n|, |n+1|, |n+2|, ..., */
/* are concatenated here.) */
/* */
{a(n, terms_wanted) =
local(v = vector(terms_wanted), term = 0, s = "", b, m, p);
while(term<terms_wanted,
b = binary(n);
m = matsize(b)[2];
p = 1;
while(p<=m && term<terms_wanted,
s = concat(s, Str(b[p]));
if(b[p]==0,
term++;
v[term] = eval(s);
s = "";
);
p++;
);
n++;
); return(v)}
A213087 = a(0, 100000);
for(n=1, 100000, write("b213087.txt", n, " ", A213087[n]))
(Haskell)
a213087 n = a213087_list !! (n-1)
a213087_list = f a030190_list where
f xs = foldl1 (\v d -> 10 * v + d) (ys ++ [0]) : f zs where
(ys, _:zs) = span (/= 0) xs
-- Reinhard Zumkeller, Jun 30 2012
CROSSREFS
Cf. A030190.
Sequence in context: A159484 A283219 A283137 * A284244 A232781 A248468
KEYWORD
nonn,base,easy
AUTHOR
Rick L. Shepherd, Jun 07 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)