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 A259574 #28 Mar 02 2025 22:35:17 %S A259574 0,1,4,11,22,42,66,104,150,211,280,377,474,604,750,916,1096,1323,1548, %T A259574 1831,2122,2446,2794,3212,3620,4087,4590,5141,5698,6360,6990,7728, %U A259574 8484,9289,10156,11091,12006,13042,14122,15280,16420,17727,18984,20401,21852 %N A259574 Sum of numbers in the n-th antidiagonal of the reciprocity array of 0. %C A259574 The "reciprocity law" that Sum_{k=0..m} [(n*k+x)/m] = Sum_{k=0..n} [(m*k+x)/n] where x is a real number and m and n are positive integers, is proved in Section 3.5 of Concrete Mathematics (see References). See A259572 for a guide to related sequences. %D A259574 R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94. %H A259574 Clark Kimberling, <a href="/A259574/b259574.txt">Table of n, a(n) for n = 1..500</a> %F A259574 a(n) = Sum_{m=1..n} Sum_{k=0..m-1} floor(n*k/m). %p A259574 seq(add(add(floor(n*k/m),k=0..m-1),m=1..n), n=1..100); # _Robert Israel_, Jul 06 2015 %t A259574 f[n_] := Sum[Floor[n*k/m], {m, n}, {k, 0, m - 1}]; Array[f, 50] %o A259574 (PARI) a(n) = {r=0;for(m=1,n,for(k=0,m-1,r=r+floor((n*k)/m)));return(r);} main(size)={return(vector(size,n,a(n)));} /* _Anders Hellström_, Jul 07 2015 */ %Y A259574 Cf. A259572, A259573. %K A259574 nonn,easy %O A259574 1,3 %A A259574 _Clark Kimberling_, Jun 30 2015