OFFSET
1,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
The base-5 digits of 240 are 1,4,3,0; here #(pits) = 0 and #(peaks) = 1, so 240 is in the sequence.
MATHEMATICA
z = 200; b = 5;
d[n_] := Differences[Sign[Differences[IntegerDigits[n, b]]]];
Select[Range [z], Count[d[#], -2] == Count[d[#], 2] &] (* A296867 *)
Select[Range [z], Count[d[#], -2] < Count[d[#], 2] &] (* A296868 *)
Select[Range [z], Count[d[#], -2] > Count[d[#], 2] &] (* A296869 *)
updnQ[n_]:=Total[Which[#[[1]]<#[[2]]>#[[3]], 1, #[[1]]>#[[2]]<#[[3]], -1, True, 0]&/@Partition[IntegerDigits[n, 5], 3, 1]]>0; Select[Range[ 250], updnQ] (* Harvey P. Dale, Dec 20 2020 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Jan 09 2018
STATUS
approved