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 A259576 #17 Mar 03 2025 06:46:48 %S A259576 1,2,1,2,3,4,3,4,3,6,3,6,3,6,5,6,3,8,3,8,5,6,3,10,5,6,5,10,3,10,3,8,5, %T A259576 6,7,14,3,6,5,12,3,12,3,10,11,6,3,14,5,10,5,10,3,12,9,12,5,6,3,18,3,6, %U A259576 11,10,9,14,3,10,5,16,3,18,3,6,9,10,7,14,3 %N A259576 Number of distinct differences in row n of the reciprocity array of 1. %C A259576 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 A259576 R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94. %H A259576 Antti Karttunen, <a href="/A259576/b259576.txt">Table of n, a(n) for n = 1..5000</a> %e A259576 In the array at A259575, row 6 is (1,3,6,8,11,15,16,18,...), with differences (2,3,2,3,4,1,2,...), and distinct differences {1,2,3,4}, so that a(6) = 4. %t A259576 x = 1; s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}]; %t A259576 t[m_] := Table[s[m, n], {n, 1, 1000}]; %t A259576 u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}] (* A259576 *) %o A259576 (PARI) %o A259576 A259575sq(m,n) = sum(k=0,m-1,(1+(n*k))\m); %o A259576 A259576(n) = #Set(vector(n,k,A259575sq(n,1+k)-A259575sq(n,k))); \\ _Antti Karttunen_, Mar 02 2023 %Y A259576 Cf. A249572, A249573, A259575. %K A259576 nonn,easy %O A259576 1,2 %A A259576 _Clark Kimberling_, Jul 01 2015