cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A168012 a(n) = sum of all divisors of all numbers k such that n^2 <= k < (n+1)^2.

This page as a plain text file.
%I A168012 #18 Oct 23 2023 15:39:37
%S A168012 8,48,133,302,516,923,1346,2038,2768,3891,4810,6572,7959,10066,12186,
%T A168012 14944,17261,21210,23992,28497,32550,37742,42111,48906,54252,61280,
%U A168012 68153,76958,82942,94661,101882,113082,123794,135583,145630,161526
%N A168012 a(n) = sum of all divisors of all numbers k such that n^2 <= k < (n+1)^2.
%H A168012 Paolo Xausa, <a href="/A168012/b168012.txt">Table of n, a(n) for n = 1..1000</a>
%e A168012 a(2) = 48 because the numbers k are 4,5,6,7 and 8 (since 2^2 <= k < 3^2) and sigma(4) + sigma(5) + sigma(6) + sigma(7) + sigma(8) = 7 + 6 + 12 + 8 + 15 = 48, where sigma(n) is the sum of divisors of n (see A000203).
%t A168012 A168012[n_]:=Sum[DivisorSigma[1,k],{k,n^2,(n+1)^2-1}];
%t A168012 Array[A168012,50] (* _Paolo Xausa_, Oct 23 2023 *)
%o A168012 (PARI) a(n)=sum(k=n^2,(n+1)^2-1,sigma(k)) \\ _Franklin T. Adams-Watters_, May 14 2010
%o A168012 (Python)
%o A168012 def A168012(n):
%o A168012     a, b = n*(n+2),(n-1)*(n+1)
%o A168012     return (sum((q:=a//k)*((s:=k<<1)+q+1)-(r:=b//k)*(s+r+1) for k in range(1,n))>>1)+5*n+3 # _Chai Wah Wu_, Oct 23 2023
%Y A168012 Cf. A000203, A024916, A168010, A168011, A168013.
%K A168012 nonn
%O A168012 1,1
%A A168012 _Omar E. Pol_, Nov 16 2009
%E A168012 More terms from _Franklin T. Adams-Watters_, May 14 2010