cp's OEIS Frontend

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.

A297271 Numbers whose base-10 digits have equal down-variation and up-variation; see Comments.

This page as a plain text file.
%I A297271 #16 Sep 27 2021 08:16:39
%S A297271 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 A297271 161,171,181,191,202,212,222,232,242,252,262,272,282,292,303,313,323,
%U A297271 333,343,353,363,373,383,393,404,414,424,434,444,454,464,474,484
%N A297271 Numbers whose base-10 digits have equal down-variation and up-variation; see Comments.
%C A297271 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 A297271 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 A297271 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 A297271 Clark Kimberling, <a href="/A297271/b297271.txt">Table of n, a(n) for n = 1..10000</a>
%F A297271 {k: A037851(k) = A037860(k)}. - _R. J. Mathar_, Sep 27 2021
%e A297271 13601 in base-10:  1,3,6,0,1, having DV = 6, UV = 6, so that 13601 is in the sequence.
%t A297271 g[n_, b_] := Map[Total, GatherBy[Differences[IntegerDigits[n, b]], Sign]];
%t A297271 x[n_, b_] := Select[g[n, b], # < 0 &]; y[n_, b_] := Select[g[n, b], # > 0 &];
%t A297271 b = 10; z = 2000; p = Table[x[n, b], {n, 1, z}]; q = Table[y[n, b], {n, 1, z}];
%t A297271 w = Sign[Flatten[p /. {} -> {0}] + Flatten[q /. {} -> {0}]];
%t A297271 Take[Flatten[Position[w, -1]], 120]   (* A297270 *)
%t A297271 Take[Flatten[Position[w, 0]], 120]    (* A297271 *)
%t A297271 Take[Flatten[Position[w, 1]], 120]    (* A297272 *)
%Y A297271 Cf. A002113, A266140, A297330, A297270, A297272.
%K A297271 nonn,base,easy
%O A297271 1,2
%A A297271 _Clark Kimberling_, Jan 16 2018