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!)
A190592 Maximal digit in base-3 expansion of n. 5
0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = 2 if n == 2 (mod 3), a(1)=1, otherwise a(n) = a(floor(n/3)). - Robert Israel, Aug 11 2017
a(n) = A054055(A007089(n)). - Felix Fröhlich, Aug 13 2017
MAPLE
[seq(max(convert(n, base, 3)), n=0..120)];
MATHEMATICA
Join[{0}, gl[n_] := Module[{idn = IntegerDigits[n, 3]}, Max[idn]]; Array[gl, 100]] (* Vincenzo Librandi, Aug 12 2017 *)
PROG
(PARI) a(n) = if (n==0, 0, vecmax(digits(n, 3))); \\ Michel Marcus, Aug 12 2017
CROSSREFS
Sequence in context: A183935 A046081 A366417 * A062501 A182599 A183015
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 13 2011, based on a suggestion from Marc LeBrun.
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 March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)