A296869 Numbers whose base-5 digits d(m), d(m-1), ..., d(0) have #(pits) < #(peaks); see Comments.
35, 36, 40, 41, 42, 45, 46, 47, 48, 65, 66, 67, 70, 71, 72, 73, 95, 96, 97, 98, 160, 161, 165, 166, 167, 170, 171, 172, 173, 175, 180, 181, 190, 191, 192, 195, 196, 197, 198, 200, 205, 206, 210, 211, 212, 220, 221, 222, 223, 225, 230, 231, 235, 236, 237, 240
Offset: 1
Examples
The base-5 digits of 240 are 1,4,3,0; here #(pits) = 0 and #(peaks) = 1, so 240 is in the sequence.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Comments