Skip to content

Commit 887fad0

Browse files
committed
modified: Math/partial_sums_of_powerfree_numbers.sf
1 parent 8c171af commit 887fad0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Math/partial_sums_of_powerfree_numbers.sf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
func powerfree_sum(n, k=2) {
1313
var sum = 0
14-
n.isqrt.each_squarefree {|v|
14+
n.iroot(k).each_squarefree {|v|
1515
sum += (moebius(v) * v**k * faulhaber(idiv(n, v**k), 1))
1616
}
1717
return sum

Math/partial_sums_of_powerfree_part.sf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# https://oeis.org/A007913 -- Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square.
1111
# https://oeis.org/A050985 -- Cubefree part of n.
1212
# https://oeis.org/A069891 -- a(n) = Sum_{k=1..n} A007913(k), the squarefree part of k.
13-
#
1413

1514
func f(n, r) {
1615
n.factor_prod {|p|

0 commit comments

Comments
 (0)