OFFSET
1,3
COMMENTS
Sum of the semiperimeters of the distinct rectangles with squarefree length and width such that L + W = n, W < L.
FORMULA
a(n) = n * Sum_{i=1..floor((n-1)/2)} mu(i)^2 * mu(n-i)^2, where mu(n) is the Möbius function (A008683).
EXAMPLE
For n = 4,5,6,7 the partitions are respectively 1+3 (sum a(4) = 4), 2+3 (sum 5), 1+5 (sum 6), 1+6 and 2+5 (sum 7+7=14). - N. J. A. Sloane, Oct 28 2017
MATHEMATICA
Table[n*Sum[MoebiusMu[i]^2*MoebiusMu[n - i]^2, {i, Floor[(n-1)/2]}], {n, 80}]
PROG
(Python)
from sympy import mobius
def a(n): return n*sum(mobius(i)**2*mobius(n - i)**2 for i in range(1, ((n - 1)//2) + 1))
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Nov 07 2017
(R)
require(numbers)
a <- function(n) {
if (n<3) return(0)
S <- numeric()
for (i in 1:floor((n-1)/2)) S <- c(S, moebius(i)^2*moebius(n-i)^2)
return(n*sum(S))
}
sapply(1:100, a) # Indranil Ghosh, Nov 07 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 25 2017; recomputed Oct 26 2017 with thanks to Andrey Zabolotskiy
STATUS
approved