login
A369308
The number of square divisors d of n such that n/d is also a square.
2
1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0
OFFSET
1,4
LINKS
FORMULA
Multiplicative with a(p^e) = 0 is e is odd, and e/2 + 1 if e is even.
a(n) = 0, if n is not a square (A000037), and A000005(sqrt(n)) otherwise.
Dirichlet g.f.: zeta(2*s)^2.
Sum_{k=1..n} a(k) ~ sqrt(n) * (log(n)/2 + 2*gamma - 1), where gamma is Euler's constant (A001620).
MATHEMATICA
f[p_, e_] := If[OddQ[e], 0, e/2+1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecprod(apply(x -> if(x%2, 0, x/2 + 1), factor(n)[, 2]));
(Python)
from math import prod
from sympy import factorint
def A369308(n): return prod(0 if e&1 else (e>>1)+1 for e in factorint(n).values()) # Chai Wah Wu, Jan 19 2024
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Jan 19 2024
STATUS
approved