rename functions

This commit is contained in:
filifa
2025-10-07 17:28:31 -04:00
parent a9c7f8091b
commit 26c197318e
10 changed files with 15 additions and 16 deletions

View File

@@ -42,7 +42,6 @@ func updateMultiples(sieve []uint, x uint, p uint, n uint) {
if p*q >= n {
break
}
println(q)
// sigma_x(p^k) = p^(kx) + sigma_x(p^(k-1))
sieve[p*q] = pow(p*q, x) + sieve[q]
@@ -50,9 +49,9 @@ func updateMultiples(sieve []uint, x uint, p uint, n uint) {
}
/*
DivisorSieve computes sigma_x(k) for k=1 to n, where sigma_x is the divisor sum function. x sets the power each divisor is raised to.
Divisors computes sigma_x(k) for k=1 to n, where sigma_x is the divisor sum function. x sets the power each divisor is raised to.
*/
func DivisorsSieve(n uint, x uint, buflen uint) chan uint {
func Divisors(n uint, x uint, buflen uint) chan uint {
sieve := make([]uint, n)
sieve[0] = 0
for i := uint(1); i < n; i++ {