A365402 The number of divisors of the largest unitary divisor of n that is an exponentially odd number.
1, 2, 2, 1, 2, 4, 2, 4, 1, 4, 2, 2, 2, 4, 4, 1, 2, 2, 2, 2, 4, 4, 2, 8, 1, 4, 4, 2, 2, 8, 2, 6, 4, 4, 4, 1, 2, 4, 4, 8, 2, 8, 2, 2, 2, 4, 2, 2, 1, 2, 4, 2, 2, 8, 4, 8, 4, 4, 2, 4, 2, 4, 2, 1, 4, 8, 2, 2, 4, 8, 2, 4, 2, 4, 2, 2, 4, 8, 2, 2, 1, 4, 2, 4, 4, 4, 4
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Vaclav Kotesovec, Graph - the asymptotic ratio (100000 terms)
Programs
-
Mathematica
f[p_, e_] := If[OddQ[e], e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = vecprod(apply(x -> if(x%2, x+1, 1), factor(n)[, 2]));
-
Python
from math import prod from sympy import factorint def A365402(n): return prod(e+1 for e in factorint(n).values() if e&1) # Chai Wah Wu, Nov 17 2023
-
SageMath
def a(n): return prod((valuation(n,p)+1) for p in prime_divisors(n) if valuation(n,p)%2==1) # Orges Leka, Nov 16 2023
Formula
a(n) >= 1 with equality if and only if n is a square (A000290).
Multiplicative with a(p^e) = 1 if e is even, and e+1 if e is odd.
Dirichlet g.f.: zeta(2*s)^2 * Product_{p prime} (1 + 2/p^s - 1/p^(2*s)).
From Vaclav Kotesovec, Sep 05 2023: (Start)
Dirichlet g.f.: zeta(s)^2 * zeta(2*s)^2 * Product_{p prime} (1 - 4/p^(2*s) + 4/p^(3*s) - 1/p^(4*s)).
Let f(s) = Product_{p prime} (1 - 4/p^(2*s) + 4/p^(3*s) - 1/p^(4*s)).
Sum_{k=1..n} a(k) ~ f(1) * Pi^4 * n / 36 * (log(n) + 2*gamma - 1 + 24*Zeta'(2)/Pi^2 + f'(1)/f(1)), where
f(1) = Product_{p prime} (1 - 4/p^2 + 4/p^3 - 1/p^4) = 0.2177787166195363783230075141194468131307977550013559376482764035236264911...
f'(1) = f(1) * Sum_{p prime} 4*(2*p - 1) * log(p) / (1 - 3*p + p^2 + p^3) = f(1) * 3.3720882314412399056794495057358594564001229865925330149186567502684770675...
and gamma is the Euler-Mascheroni constant A001620. (End)
a(n) = Sum_{d|n} (-1)^(Sum_{p|gcd(d,n/d)} v_p(d)*v_p(n/d)), where v_p(x) denotes the valuation of x at the prime p. - Orges Leka, Nov 16 2023
Comments