OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p^e) = (q - 1) * q^(e-1) * p^e, where q is the least prime greater than p.
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} ((p^3-p^2-p+1)/(p^3 - p*q)) = 0.836506229..., where q(p) = nextprime(p) = A151800(p). - Amiram Eldar, Dec 31 2022
MATHEMATICA
f[p_, e_] := ((q = NextPrime[p]) - 1) * q^(e - 1) * p^e; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 10 2022 *)
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
(Python)
from math import prod
from sympy import nextprime, factorint
def A353789(n): return prod((q:= nextprime(p))**(e-1)*p**e*(q-1) for p, e in factorint(n).items()) # Chai Wah Wu, May 10 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, May 10 2022
STATUS
approved