A264990 a(n) = number of occurrences of a most frequent nonzero digit in factorial base representation (A007623) of n.
0, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 2, 3, 3, 4, 2, 3, 1, 2, 2, 3, 2, 2, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2
Offset: 0
Examples
n A007623(n) a(n) [highest number of times any nonzero digit occurs]. 0 = 0 0 (because no nonzero digits present) 1 = 1 1 2 = 10 1 3 = 11 2 4 = 20 1 5 = 21 1 6 = 100 1 7 = 101 2 8 = 110 2 9 = 111 3 10 = 120 1 11 = 121 2 12 = 200 1 13 = 201 1 14 = 210 1 15 = 211 2 16 = 220 2 17 = 221 2 18 = 300 1 and for n=63 we have: 63 = 2211 2.
Links
Crossrefs
Programs
-
Mathematica
a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Max[Tally[Select[s, # > 0 &]][[;;,2]]]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jan 24 2024 *)
-
Python
from sympy import prime, factorint from operator import mul import collections def a007623(n, p=2): return n if n
Formula
Extensions
Name changed by Antti Karttunen, Aug 15 2016