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 A259579 #12 Mar 03 2025 06:46:58 %S A259579 1,2,3,2,1,4,3,4,5,4,3,6,3,4,5,6,3,6,3,6,7,6,3,10,3,6,7,8,3,12,3,8,9, %T A259579 6,5,12,3,6,9,10,3,12,3,10,9,6,3,16,5,8,9,10,3,10,5,10,9,6,3,20,3,6,9, %U A259579 10,5,14,3,10,9,12,3,16,3,6,11,10,9,14,3,14 %N A259579 Number of distinct differences in row n of the reciprocity array of 2. %C A259579 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 A259579 R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94. %e A259579 In the array at A259578, row 6 is (2,5,6,10,12,15,17,20,21,25,27,...), with differences (3,1,4,2,3,2,3,1,4,2,...), and distinct differences {1,2,3,4}, so that a(6) = 4. %t A259579 x = 2; s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}]; %t A259579 t[m_] := Table[s[m, n], {n, 1, 1000}]; %t A259579 u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}] %Y A259579 Cf. A249572, A249577, A259580. %K A259579 nonn,easy %O A259579 1,2 %A A259579 _Clark Kimberling_, Jul 17 2015