OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Robert Israel, Plot of a(n)/n^2 for n=1..20000
FORMULA
a(p) = p^2 + p + 1 for p = primes (A000040).
EXAMPLE
a(6) = lcm(1, sigma(1)) + lcm(2, sigma(2)) + lcm(3, sigma(3)) + lcm(6, sigma(6)) = lcm(1, 1) + lcm(2, 3) + lcm(3, 4) + lcm(6, 12) = 1 + 6 + 12 + 12 = 31.
MAPLE
N:= 100: # for a(1)..a(N)
V:= Vector(N):
for d from 1 to N do
t:= ilcm(d, numtheory:-sigma(d));
R:= [seq(i, i=d..N, d)];
V[R]:= V[R] +~ t;
od:
convert(V, list); # Robert Israel, May 13 2020
MATHEMATICA
a[n_] := DivisorSum[n, LCM[#, DivisorSigma[1, #]] &]; Array[a, 100] (* Amiram Eldar, May 10 2020 *)
PROG
(Magma) [&+[LCM(d, &+Divisors(d)): d in Divisors(n)]: n in [1..100]]
(PARI) a(n) = sumdiv(n, d, lcm(d, sigma(d))); \\ Michel Marcus, May 10 2020
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Jaroslav Krizek, May 10 2020
STATUS
approved