OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
MATHEMATICA
f1[p_, e_] := If[p==2, 1, (p^(e+1)-1)/(p-1)]; f2[p_, e_] := If[p == 2, -Boole[e == 1], Which[e == 1, -p - 1, e == 2, p, e > 2, 0]]; a[1] = 2; a[n_] := Times @@ f1 @@@ (f = FactorInteger[n]) + Times @@ f2 @@@ f; Array[a, 100] (* Amiram Eldar, Dec 08 2021 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 08 2021
STATUS
approved