login
This site is supported by donations 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

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

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

Cf. A054055, A037897.

Sequence in context: A209032 A183935 A046081 * A062501 A182599 A183015

Adjacent sequences:  A190589 A190590 A190591 * A190593 A190594 A190595

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

License Agreements, Terms of Use, Privacy Policy .

Last modified October 20 15:14 EDT 2017. Contains 293612 sequences.