login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297250 Numbers whose base-3 digits having equal up-variation and down-variation; see Comments. 4
1, 2, 4, 8, 10, 13, 16, 20, 23, 26, 28, 31, 34, 37, 40, 43, 46, 49, 52, 56, 59, 62, 65, 68, 71, 74, 77, 80, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 164, 167, 170, 173 (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

Clark Kimberling, Table of n, a(n) for n = 1..10000

EXAMPLE

173 in base-3:  2,0,1,0,2, having DV = 3, UV = 3, so that 173 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 = 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 *)

CROSSREFS

Cf. A297249, A297251, A297330.

Sequence in context: A219617 A100278 A075333 * A014190 A141400 A190744

Adjacent sequences:  A297247 A297248 A297249 * A297251 A297252 A297253

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 05:30 EDT 2019. Contains 324218 sequences. (Running on oeis4.)