OFFSET
1,2
EXAMPLE
For n = 42:
- 42 = 2 * 3 * 7 = prime(1)^1 * prime(2)^1 * prime(4)^1,
- a(42) = (1^2 + 1^2) * (2^2 + 1^2) * (4^2 + 1^2) = 170.
MAPLE
a:= proc(n) option remember; uses numtheory;
mul(pi(i[1])^2+i[2]^2, i=ifactors(n)[2])
end:
seq(a(n), n=1..60); # Alois P. Heinz, Feb 15 2022
MATHEMATICA
f[p_, e_] := PrimePi[p]^2 + e^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 15 2022 *)
PROG
(PARI) a(n) = { my (f=factor(n), p=f[, 1]~, e=f[, 2]~); prod (k=1, #p, primepi(p[k])^2 + e[k]^2) }
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Rémy Sigrist, Feb 12 2022
STATUS
approved