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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297249 Numbers whose base-3 digits have greater down-variation than up-variation; see Comments. 4
3, 6, 7, 9, 12, 15, 18, 19, 21, 22, 24, 25, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

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

147 in base-3:  1,3,1,1,0, having DV = 3, UV = 2, so that 147 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. A297250, A297251, A297330.

Sequence in context: A026227 A026232 A286802 * A061641 A325443 A085359

Adjacent sequences:  A297246 A297247 A297248 * A297250 A297251 A297252

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 May 25 05:45 EDT 2019. Contains 323539 sequences. (Running on oeis4.)