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!)
A246359 Maximum digit in the factorial base expansion of n (A007623). 11
0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Maximum entry in n-th row of A108731.
LINKS
FORMULA
From Antti Karttunen, Aug 29 2016: (Start)
a(0) = 0; for n >= 1, a(n) = 1 + a(A257684(n)).
a(0) = 0; for n >= 1, a(n) = max(A099563(n), a(A257687(n))).
a(n) = A051903(A276076(n)).
(End)
EXAMPLE
Factorial base representation of 46 is "1320" as 46 = 1*4! + 3*3! + 2*2! + 0*1!, and the largest of these digits is 3, thus a(46) = 3.
MATHEMATICA
nn = 96; m = 1; While[Factorial@ m < nn, m++]; m; Table[Max@ IntegerDigits[n, MixedRadix[Reverse@ Range[2, m]]], {n, 0, nn}] (* Version 10.2, or *)
f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Range[# + 1] <= n &]; Most@ Rest[a][[All, 1]] /. {} -> {0}]; Table[Max@ f@ n, {n, 0, 96}] (* Michael De Vlieger, Aug 29 2016 *)
PROG
(MIT/GNU Scheme) (define (A246359 n) (let loop ((n n) (i 2) (md 0)) (if (zero? n) md (loop (floor->exact (/ n i)) (+ i 1) (max (modulo n i) md)))))
(Python)
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a(n): return int(max(str(a007623(n))))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 21 2017
CROSSREFS
Cf. also A249070.
Sequence in context: A342461 A157129 A101615 * A328114 A343504 A328582
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 20 2014
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 April 24 13:00 EDT 2024. Contains 371945 sequences. (Running on oeis4.)