OFFSET
1,1
MATHEMATICA
SequencePosition[Table[If[SequenceCount[IntegerDigits[n, 8], {0, 1}]>0 || SequenceCount[IntegerDigits[n, 8], {1, 0}]>0, 1, 0], {n, 1600}], {1, 0}][[All, 1]] (* Harvey P. Dale, Dec 28 2021 *)
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 25 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved