%I #21 Apr 01 2021 14:44:50
%S 1,3,1,5,1,10,1,17,7,9,1,35,1,13,7,33,1,33,1,42,7,17,1,79,6,19,10,55,
%T 1,59,1,75,10,23,6,119,1,25,10,110,1,66,1,85,24,29,1,174,1,46,13,95,1,
%U 108,6,149,13,33,1,204,1,37,22,165,6,109,1,123,13,61,1,304,1,43,18,135,8
%N a(n) = sum of the d(k)'s, where 1<=k<=n and d(k) is equal to any divisor of n, where d(k) is the number of positive divisors of k.
%H Antti Karttunen, <a href="/A126213/b126213.txt">Table of n, a(n) for n = 1..16384</a>
%e 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.
%t f[n_] := Plus @@ Select[Table[Length@Divisors[k], {k, n}], MemberQ[Divisors[n], # ] &];Table[f[n], {n, 78}] (* _Ray Chandler_, Dec 21 2006 *)
%o (PARI) A126213(n) = sumdiv(n, d, d*sum(k=1, n, (numdiv(k)==d))); \\ _Antti Karttunen_, Apr 01 2021
%o (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
%Y Cf. A000005, A126212.
%K nonn,look
%O 1,2
%A _Leroy Quet_, Dec 20 2006
%E Extended by _Ray Chandler_, Dec 21 2006