OFFSET
1,2
FORMULA
Multiplicative with a(p^e) = (q^(e+1)-1)/(q-1) where q = (nextPrime(p)+1)/2. - David W. Wilson, Sep 01 2001; corrected by Michel Marcus, Feb 26 2015
MAPLE
f:= proc(n) local q, r, t;
r:= 1;
for t in ifactors(n)[2] do
q:= (nextprime(t[1])+1)/2;
r:= r*(q^(t[2]+1)-1)/(q-1);
od:
r
end proc:
seq(f(n), n=1..100); # Robert Israel, Feb 26 2015
MATHEMATICA
f[p_, e_] := Module[{q = (NextPrime[p] + 1)/2}, (q^(e+1)-1)/(q-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)); for (i=1, #f~, q = (nextprime(f[i, 1] + 1)+1)/2; f[i, 1] = (q^(f[i, 2]+1) - 1)/(q-1); f[i, 2] = 1); factorback(f); } \\ Michel Marcus, Feb 26 2015
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
EXTENSIONS
Corrected and extended by David W. Wilson, Aug 29 2001
STATUS
approved