Skip to content

Commit be37d0f

Browse files
authored
Merge pull request cp-algorithms#1029 from jxu/patch-10
Cite Legendre's Formula (cp-algorithms#1019)
2 parents 5243be4 + 671d873 commit be37d0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/algebra/factorial-divisors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The final answer is
2424

2525
$$\Bigl\lfloor\dfrac{n}{k}\Bigr\rfloor + \Bigl\lfloor\dfrac{n}{k^2}\Bigr\rfloor + \ldots + \Bigl\lfloor\dfrac{n}{k^i}\Bigr\rfloor + \ldots$$
2626

27+
This result is also known as [Legendre's formula](https://en.wikipedia.org/wiki/Legendre%27s_formula).
2728
The sum is of course finite, since only approximately the first $\log_k n$ elements are not zeros. Thus, the runtime of this algorithm is $O(\log_k n)$.
2829

2930
### Implementation

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy