login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A273040 Least k >= 2 such that the base-k digits of n are nondecreasing. 1
2, 3, 2, 3, 3, 4, 2, 3, 5, 4, 4, 5, 3, 3, 2, 6, 3, 5, 5, 7, 4, 4, 4, 5, 7, 3, 4, 6, 6, 8, 2, 5, 5, 5, 6, 8, 5, 5, 5, 3, 3, 4, 4, 3, 6, 6, 4, 7, 5, 6, 6, 6, 3, 8, 8, 10, 6, 6, 6, 7, 7, 5, 2, 5, 6, 7, 7, 5, 5, 9, 6, 11, 7, 5, 7, 7, 8, 8, 8, 3, 7, 7, 7, 8, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) = 2 iff n is in A000225.

a(n) = 3 iff n is in A023745 but not A000225.

a(n) <= floor(n/2)-1 if n > 9.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(6) = 4 because 6 is 110 in base 2 and 20 in base 3, which do not have nondecreasing digits, but 12 in base 4 has nondecreasing digits.

MAPLE

F:= proc(n) local k;

   for k from 2 do if ListTools:-Sorted(convert(n, base, k), `>`) then return k fi od:

end proc:

map(f, [$1..1000]);

MATHEMATICA

Table[k = 2; While[Sort@ # != # &@ IntegerDigits[n, k], k++]; k, {n, 1, 120}] (* Michael De Vlieger, May 14 2016 *)

lk[n_]:=Module[{k=2}, While[Min[Differences[IntegerDigits[n, k]]]<0, k++]; k]; Array[lk, 90] (* Harvey P. Dale, May 24 2016 *)

CROSSREFS

Cf. A000225, A009994, A023745 to A023757.

Sequence in context: A078627 A106370 A128630 * A319982 A304331 A241834

Adjacent sequences:  A273037 A273038 A273039 * A273041 A273042 A273043

KEYWORD

nonn,base

AUTHOR

Robert Israel, May 13 2016

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 September 24 07:28 EDT 2020. Contains 337317 sequences. (Running on oeis4.)