%I #16 Sep 27 2021 08:16:39
%S 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151,
%T 161,171,181,191,202,212,222,232,242,252,262,272,282,292,303,313,323,
%U 333,343,353,363,373,383,393,404,414,424,434,444,454,464,474,484
%N Numbers whose base-10 digits have equal down-variation and up-variation; see Comments.
%C Suppose that n has base-b digits b(m), b(m-1), ..., b(0). The base-b down-variation of n is the sum DV(n,b) of all d(i)-d(i-1) for which d(i) > d(i-1); the base-b up-variation of n is the sum UV(n,b) of all d(k-1)-d(k) for which d(k) < d(k-1). The total base-b variation of n is the sum TV(n,b) = DV(n,b) + UV(n,b). See the guide at A297330.\
%C Differs after the zero from A002113 first at 1011, which is not a palindrome but has DV(1011,10) = UV(1011,10) =1. - _R. J. Mathar_, Jan 23 2018
%C Apart from 0, the initial terms coincide with those of A266140, but the two sequences are different. First disagreement: a(109) = 1001 and A266140(110) = 1111. - _Georg Fischer_, Oct 09 2018
%H Clark Kimberling, <a href="/A297271/b297271.txt">Table of n, a(n) for n = 1..10000</a>
%F {k: A037851(k) = A037860(k)}. - _R. J. Mathar_, Sep 27 2021
%e 13601 in base-10: 1,3,6,0,1, having DV = 6, UV = 6, so that 13601 is in the sequence.
%t g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]];
%t x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &];
%t b = 10; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}];
%t w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]];
%t Take[Flatten[Position[w, -1]], 120] (* A297270 *)
%t Take[Flatten[Position[w, 0]], 120] (* A297271 *)
%t Take[Flatten[Position[w, 1]], 120] (* A297272 *)
%Y Cf. A002113, A266140, A297330, A297270, A297272.
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_, Jan 16 2018