OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
EXAMPLE
The number of divisors of the integers 1 through 10 form the sequence 1,2,2,3,2,4,2,4,3,4. The divisors of 10 are 1,2,5,10. The terms of the sequence of the first ten d(k)'s which equal any divisor of 10 are the five terms 1,2,2,2,2. So a(10) = 1+2+2+2+2 = 9.
MATHEMATICA
f[n_] := Plus @@ Select[Table[Length@Divisors[k], {k, n}], MemberQ[Divisors[n], # ] &]; Table[f[n], {n, 78}] (* Ray Chandler, Dec 21 2006 *)
PROG
(PARI) A126213(n) = sumdiv(n, d, d*sum(k=1, n, (numdiv(k)==d))); \\ Antti Karttunen, Apr 01 2021
(PARI) first(n) = { n = min(n, 245044799); qdivs = vector(960); res = vector(n); for(i = 1, n, nd = numdiv(i); qdivs[nd]++; d = select(x -> x <= #qdivs, divisors(i)); res[i] = sum(j = 1, #d, d[j]*qdivs[d[j]]) ); res } \\ David A. Corneth, Apr 01 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Dec 20 2006
EXTENSIONS
Extended by Ray Chandler, Dec 21 2006
STATUS
approved