OFFSET
1,1
COMMENTS
A167500 lists the positions of 1's when the sequence is written in binary. This sequence lists the positions of 0's. When written in binary, it begins 10, 111, 1000, 1001, 1011... The first 0 appears at position 2, so a(1) = 2 = 10. The second 0 appears at position 7, so a(2) = 7 = 111. The third 0 appears at position 8, so a(3) = 8 = 1000. The sequence then becomes self-generating, because entries are added to it faster than 0's are detected in it.
LINKS
Anthony Sand, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = zeropos([sequence],n).
EXAMPLE
a(1) = zeropos([10...],1) = 2,
a(2) = zeropos([10,111,1000...],2) = 7,
a(3) = zeropos([10,111,1000...],3) = 8,
a(4) = zeropos([10,111,1000...],4) = 9,
a(5) = zeropos([10,111,1000,1001...],5) = 11.
PROG
(PARI) { zeroposseq()= smx=100; s=vector(smx); s[1]=2; s[2]=7; s[3]=8; si=0; dig=digits(s[1], 2); di=1; i=1; dl=0; while(si<smx, d=dig[i]; dl++; if(d==0, si++; s[si]=dl; print1(dl, ", "); ); i++; if(i>#dig, di++; dig=digits(s[di], 2); i=1; ); ); }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Anthony Sand, May 26 2017
STATUS
approved