OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) >= 1 with equality if and only if n is a square (A000290).
Multiplicative with a(p^e) = p^(2*e) + 1 if e is odd, and 1 otherwise.
Dirichlet g.f.: zeta(s) * zeta(2*s-4) * Product_{p prime} (1 + 1/p^(s-2) - 1/p^(2*s-4) - 1/p^(2*s-2)).
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = zeta(2) * zeta(3) * Product_{p prime} (1 - 2/p^2 + 1/p^3 - 1/p^4 + 1/p^5) = 0.79482441214759383925... .
MATHEMATICA
f[p_, e_] := 1 + If[OddQ[e], p^(2*e), 0]; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + if(f[i, 2]%2, f[i, 1]^(2*f[i, 2]), 0)); }
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Jul 11 2024
STATUS
approved