The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A064459 a(n) = Sum_{k>=1} floor(n/12^k). 4
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,25 COMMENTS Original incorrect name was: "Highest power of 12 dividing n!": that sequence is A090619.  If p is prime, Legendre's formula says the highest power of p dividing n! is Sum_{k>=1} floor(n/p^k), but of course 12 is not prime. - Robert Israel, Mar 23 2018 LINKS Harry J. Smith, Table of n, a(n) for n=0..1000 Wikipedia, Legendre's formula. FORMULA a(n) = floor[n/12] + floor[n/144] + floor[n/1728] + floor[n/20736] + .... MAPLE f:= proc(n) add(floor(n/12^k), k=1..floor(log[12](n))) end proc: f(0):= 0: map(f, [\$0..100]); # Robert Israel, Mar 23 2018 MATHEMATICA Table[t = 0; p = 12; While[s = Floor[n/p]; t = t + s; s > 0, p *= 12]; t, {n, 0, 100} ] Join[{0}, Accumulate[Table[If[Divisible[n, 12], 1, 0], {n, 110}]]] (* Harvey P. Dale, Feb 14 2016 *) PROG (PARI) { for (n=0, 1000, a=0; p=12; while (s = n\p, a+=s; p*=12); write("b064459.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 15 2009 (GAP) List([0..110], n->Sum([1..n], k-?Int(n/(12^k)))); # Muniru A Asiru, Mar 24 2018 CROSSREFS Cf. A011371, A054861, A090619. Sequence in context: A111855 A071701 A342696 * A279758 A082996 A094382 Adjacent sequences:  A064456 A064457 A064458 * A064460 A064461 A064462 KEYWORD easy,nonn AUTHOR Robert G. Wilson v, Oct 03 2001 EXTENSIONS Corrected by Robert Israel, Mar 23 2018 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 24 14:46 EDT 2021. Contains 347643 sequences. (Running on oeis4.)