login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A043152
Numbers k such that 0 and 1 occur juxtaposed in the base-8 representation of k but not of k-1.
0
8, 64, 129, 136, 193, 200, 257, 264, 321, 328, 385, 392, 449, 456, 512, 641, 648, 705, 712, 769, 776, 833, 840, 897, 904, 961, 968, 1025, 1032, 1088, 1153, 1160, 1217, 1224, 1281, 1288, 1345, 1352, 1409, 1416, 1473, 1480, 1537
OFFSET
1,1
MATHEMATICA
n01Q[n_]:=MemberQ[Sort/@Partition[IntegerDigits[n, 8], 2, 1], {0, 1}]; Select[Range[1600], n01Q[#]&&!n01Q[#-1]&] (* Harvey P. Dale, Oct 25 2011 *)
PROG
(Python)
def ok(n):
on, onm1 = oct(n)[2:], oct(n-1)[2:]
return ("01" in on or "10" in on) and not ("01" in onm1 or "10" in onm1)
print(list(filter(ok, range(1, 1538)))) # Michael S. Branicky, Aug 22 2021
CROSSREFS
Cf. A007094.
Sequence in context: A209990 A235425 A255932 * A044195 A153808 A207601
KEYWORD
nonn,base
STATUS
approved