A206787 Sum of the odd squarefree divisors of n.
1, 1, 4, 1, 6, 4, 8, 1, 4, 6, 12, 4, 14, 8, 24, 1, 18, 4, 20, 6, 32, 12, 24, 4, 6, 14, 4, 8, 30, 24, 32, 1, 48, 18, 48, 4, 38, 20, 56, 6, 42, 32, 44, 12, 24, 24, 48, 4, 8, 6, 72, 14, 54, 4, 72, 8, 80, 30, 60, 24, 62, 32, 32, 1, 84, 48, 68, 18, 96, 48, 72, 4
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Jon Maiga, Computer-generated formulas for A206787, Sequence Machine.
Crossrefs
Programs
-
Haskell
a206787 = sum . filter odd . a206778_row
-
Magma
[&+[d:d in Divisors(m)|IsOdd(d) and IsSquarefree(d)]:m in [1..72]]; // Marius A. Burtea, Aug 14 2019
-
Maple
seq(add(d*mobius(2*d)^2, d in divisors(n)), n=1 .. 80); # Ridouane Oudra, Aug 14 2019
-
Mathematica
a[n_] := DivisorSum[n, #*Boole[OddQ[#] && SquareFreeQ[#]]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015 *) f[2, e_] := 1; f[p_, e_] := p + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
-
PARI
a(n) = sumdiv(n, d, d*(d % 2)*issquarefree(d)); \\ Michel Marcus, Sep 21 2014
-
Python
from math import prod from sympy import primefactors def A206787(n): return prod(1+(p if p>2 else 0) for p in primefactors(n)) # Chai Wah Wu, Oct 10 2024
Formula
a(n) = Sum_{d|n} d*mu(2*d)^2, where mu is the Möbius function (A008683). - Ridouane Oudra, Aug 14 2019
Multiplicative with a(2^e) = 1, and a(p^e) = p + 1 for p > 2. - Amiram Eldar, Sep 18 2020
Sum_{k=1..n} a(k) ~ (1/3) * n^2. - Amiram Eldar, Nov 17 2022
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s-2))*(2^s/(2^s+2)). - Amiram Eldar, Jan 03 2023
From Antti Karttunen, Nov 22 2023: (Start)
a(n) = Sum_{d|n} abs(A349343(d)). [See R. J. Mathar's Jul 12 2012 comment above]
(End)
a(n) = Sum_{d divides n, d odd} d * mu(d)^2. - Peter Bala, Feb 01 2024
Comments