This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A297261 #13 Dec 26 2024 14:36:03 %S A297261 7,14,15,21,22,23,28,29,30,31,35,36,37,38,39,42,43,44,45,46,47,49,56, %T A297261 63,70,77,84,91,98,99,105,106,112,113,119,120,126,127,133,134,140,141, %U A297261 147,148,149,154,155,156,161,162,163,168,169,170,175,176,177,182 %N A297261 Numbers whose base-7 digits have greater down-variation than up-variation; see Comments. %C A297261 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. %H A297261 Clark Kimberling, <a href="/A297261/b297261.txt">Table of n, a(n) for n = 1..10000</a> %e A297261 182 in base-7: 3,5,0, having DV = 5, UV = 2, so that 182 is in the sequence. %t A297261 g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]]; %t A297261 x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &]; %t A297261 b = 7; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}]; %t A297261 w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]]; %t A297261 Take[Flatten[Position[w, -1]], 120] (* A297261 *) %t A297261 Take[Flatten[Position[w, 0]], 120] (* A297262 *) %t A297261 Take[Flatten[Position[w, 1]], 120] (* A297263 *) %Y A297261 Cf. A297330, A297262, A297263. %K A297261 nonn,base,easy %O A297261 1,1 %A A297261 _Clark Kimberling_, Jan 15 2018 %E A297261 Name corrected by _Ray Goldman_, Aug 10 2024