login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297253 Numbers whose base-4 digits having equal up-variation and down-variation; see Comments. 4
1, 2, 3, 5, 10, 15, 17, 21, 25, 29, 34, 38, 42, 46, 51, 55, 59, 63, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 195, 199, 203, 207, 211, 215, 219, 223 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
LINKS
EXAMPLE
223 in base-4: 3,2,3,3, having DV = 1, UV = 1, so that 223 is in the sequence.
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 = 4; 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] (* A297252 *)
Take[Flatten[Position[w, 0]], 120] (* A297253 *)
Take[Flatten[Position[w, 1]], 120] (* A297254 *)
CROSSREFS
Sequence in context: A048301 A043707 A296694 * A014192 A250746 A048315
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Jan 15 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:23 EDT 2024. Contains 371960 sequences. (Running on oeis4.)