OFFSET
0,7
COMMENTS
Most sequences of the form "highest power of k dividing n!" essentially depend on one of the primes or prime powers dividing k. But in this case, the sequences with k=3 (A054861) and k=4 (A090616) are both close to n/2 and vary in which one is lower for different values of n.
a(2^n) = A090616(2^n) and a(3^n-1) = A090616(3^n-1) while a(2^n-1) = A054861(2^n-1) and a(3^n) = A054861(3^n). - Robert Israel, Mar 25 2018
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
a(6)=2 since 6!=720=12^2*5.
MAPLE
f2:= n -> n - convert(convert(n, base, 2), `+`):
f3:= n -> (n - convert(convert(n, base, 3), `+`))/2:
f:= n -> min(f3(n), floor(f2(n)/2)):
f(0):= 0:
map(f, [$0..100]); # Robert Israel, Mar 23 2018
MATHEMATICA
Table[IntegerExponent[n!, 12], {n, 0, 100}] (* Jean-François Alcover, Mar 26 2018 *)
PROG
(PARI) a(n) = valuation(n!, 12); \\ Michel Marcus, Mar 24 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Dec 06 2003
STATUS
approved