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.

Showing 1-2 of 2 results.

A259572 Reciprocity array of 0; rectangular, read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 2, 3, 2, 0, 0, 2, 3, 3, 2, 0, 0, 3, 4, 6, 4, 3, 0, 0, 3, 6, 6, 6, 6, 3, 0, 0, 4, 6, 8, 10, 8, 6, 4, 0, 0, 4, 7, 9, 10, 10, 9, 7, 4, 0, 0, 5, 9, 12, 12, 15, 12, 12, 9, 5, 0, 0, 5, 9, 12, 14, 15, 15, 14, 12, 9, 5, 0, 0, 6, 10
Offset: 1

Views

Author

Clark Kimberling, Jun 30 2015

Keywords

Comments

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). For every x, the reciprocity array is symmetric, and the principal diagonal consists primarily of triangular numbers, A000217.
In the following guide, the sequence in column 3 is the number of distinct terms in the difference sequence of row n of the reciprocity array of x; sequence in column 4 is the sum of numbers in the n-th antidiagonal of the array.
x array differences sums

Examples

			Northwest corner:
  0   0   0   0   0   0   0   0   0   0
  0   1   1   2   2   3   3   4   4   5
  0   1   3   3   4   6   6   7   9   9
  0   2   3   6   6   8   9  12  12  14
  0   2   4   6  10  10  12  14  16  20
  0   3   6   8  10  15  15  18  21  23
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 0;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    TableForm[ Table[s[m, n], {m, 1, 15}, {n, 1, 15}]] (* array *)
    u = Table[s[n - k + 1, k], {n, 15}, {k, n, 1, -1}] // Flatten (* sequence *)

Formula

T(m,n) = Sum_{k=0..m-1} [(n*k+x)/m] = Sum_{k=0..n-1} [(m*k+x)/n], where x = 0 and [ ] = floor.
Note that if [x] = [y], then [(n*k+x)/m] = [(n*k+y)/m], so that the reciprocity arrays for x and y are identical in this case.
T(m,n) = (m*n - m - n + gcd(m,n))/2. - Witold Dlugosz, Apr 07 2021

A259575 Reciprocity array of 1; rectangular, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 3, 4, 4, 3, 1, 1, 3, 5, 6, 5, 3, 1, 1, 4, 6, 7, 7, 6, 4, 1, 1, 4, 7, 8, 10, 8, 7, 4, 1, 1, 5, 8, 10, 11, 11, 10, 8, 5, 1, 1, 5, 9, 12, 13, 15, 13, 12, 9, 5, 1, 1, 6, 10, 13, 15, 16, 16, 15, 13, 10, 6, 1, 1, 6
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2015

Keywords

Comments

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.

Examples

			Northwest corner:
  1   1   1   1   1   1   1   1   1   1
  1   1   2   2   3   3   4   4   5   5
  1   2   3   4   5   6   7   8   9   10
  1   2   4   6   7   8   10  12  13  14
  1   3   5   7   10  11  13  15  17  20
  1   3   6   8   11  15  16  18  21  23
  1   4   7   10  13  16  21  22  25  28
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 1;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    TableForm[ Table[s[m, n], {m, 1, 15}, {n, 1, 15}]] (* array *)
    Table[s[n - k + 1, k], {n, 15}, {k, n, 1, -1}] // Flatten (* sequence *)

Formula

T(m,n) = Sum_{k=0..m-1} [(n*k+x)/m] = Sum_{k=0..n-1} [(m*k+x)/n], where x = 1 and [ ] = floor.
Showing 1-2 of 2 results.