OFFSET
1,3
COMMENTS
Base-8 digits must be strictly alternating in size: every other digit must be strictly less than its neighbor(s). Also: numbers whose base-8 expansion, considered as a decimal number, is in A032865 = the base-10 variant of this sequence. - M. F. Hasler, Oct 05 2018
EXAMPLE
From M. F. Hasler, Oct 05 2018: (Start)
The base-8 representation of 7, 8, 16, 17, 24, 25, 26, 32, 33 is 7, 10, 20, 21, 30, 31, 32, 40, 41.
Numbers 61, 62, 65, 66, ..., 70, 71, 129, 130, ... have the base-8 expansion 76, 77, 101, 102, ..., 106, 107, 201, 202, ... (End)
MATHEMATICA
sdQ[n_]:=Module[{s=Sign[Differences[IntegerDigits[n, 8]]]}, s==PadRight[{}, Length[s], {-1, 1}]]; Select[Range[0, 700], sdQ] (* Vincenzo Librandi, Oct 06 2018 *)
PROG
(PARI) is(n)=!for(i=2, #n=digits(n, 8), (n[i-1]-n[i])*(-1)^i>0||return) \\ M. F. Hasler, Oct 05 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
a(1) = 0 added by Vincenzo Librandi, Oct 06 2018
STATUS
approved