A297249 Numbers whose base-3 digits have greater down-variation than up-variation; see Comments.
3, 6, 7, 9, 12, 15, 18, 19, 21, 22, 24, 25, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147
Offset: 1
Examples
147 in base-3: 1,3,1,1,0, having DV = 3, UV = 2, so that 147 is in the sequence.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]]; x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &]; b = 3; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}]; w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]]; Take[Flatten[Position[w, -1]], 120] (* A297249 *) Take[Flatten[Position[w, 0]], 120] (* A297250 *) Take[Flatten[Position[w, 1]], 120] (* A297251 *)
Comments