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.
%I A256532 #40 May 22 2025 10:21:42 %S A256532 0,0,3,4,20,18,56,64,108,130,242,204,364,434,540,576,867,846,1216, %T A256532 1220,1470,1694,2254,2040,2575,2912,3375,3472,4379,4140,5177,5344, %U A256532 6072,6698,7630,7128,8621,9424,10491,10320,12177,11928,13975,14432,15255,16468,18941,17952,20286,21000,22899,23608,26765,26568,29095 %N A256532 Product of n and the sum of remainders of n mod k, for k = 1, 2, 3, ..., n. %C A256532 a(n) is also the volume (or the total number of unit cubes) of a polycube which is a right prism whose base is the symmetric representation of A004125(n). %C A256532 Note that the union of this right prism and the irregular staircase after n-th stage described in A244580 and the irregular stepped pyramid after (n-1)-th stage described in A245092, form a hexahedron (or cube) of side length n. This comment is represented by the third formula. %H A256532 Indranil Ghosh, <a href="/A256532/b256532.txt">Table of n, a(n) for n = 1..10000</a> %F A256532 a(n) = n * A004125(n). %F A256532 a(n) = n^3 - A256533(n). %F A256532 a(n) = n^3 - A143128(n) - A175254(n-1), n > 1. %e A256532 a(5) = 20 because 5 * (0 + 1 + 2 + 1) = 5 * 4 = 20. %e A256532 a(6) = 18 because 6 * (0 + 0 + 0 + 2 + 1) = 6 * 3 = 18. %e A256532 a(7) = 56 because 7 * (0 + 1 + 1 + 3 + 2 + 1) = 7 * 8 = 56. %t A256532 Table[n*Sum[Mod[n,i],{i,2,n-1}],{n,55}] (* _Ivan N. Ianakiev_, May 04 2015 *) %o A256532 (PARI) vector(50, n, n*sum(k=1, n, n % k)) \\ _Michel Marcus_, May 05 2015 %o A256532 (Python) %o A256532 def A256532(n): %o A256532 s=0 %o A256532 for k in range(1,n+1): %o A256532 s+=n%k %o A256532 return s*n # _Indranil Ghosh_, Feb 13 2017 %o A256532 (Python) %o A256532 from math import isqrt %o A256532 def A256532(n): return n**3+n*((s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # _Chai Wah Wu_, Oct 22 2023 %Y A256532 Cf. A000203, A000578, A004125, A024916, A143128, A175254, A236104, A236112, A237270, A237271, A237593, A244580, A245092, A256533. %K A256532 nonn %O A256532 1,3 %A A256532 _Omar E. Pol_, May 03 2015