OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = e+1 if p = 2; (q^(e+1)-1)/(q-1) if p > 2; where q = pi(p) = A000720(p). - David W. Wilson, Sep 01 2001
MATHEMATICA
f[p_, e_] := Module[{q = PrimePi[p]}, (q^(e+1)-1)/(q-1)]; f[2, e_] := e+1; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 04 2023 *)
PROG
(PARI) a(n)=my(f=factor(n)); prod(i=1, #f~, my([p, e]=f[i, ], q=primepi(p)); if(q==1, 1 + e, (q^(e+1)-1)/(q-1))); \\ Andrew Howroyd, Nov 18 2025
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 29 2001
STATUS
approved
