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-10 of 11 results. Next

A259574 Sum of numbers in the n-th antidiagonal of the reciprocity array of 0.

Original entry on oeis.org

0, 1, 4, 11, 22, 42, 66, 104, 150, 211, 280, 377, 474, 604, 750, 916, 1096, 1323, 1548, 1831, 2122, 2446, 2794, 3212, 3620, 4087, 4590, 5141, 5698, 6360, 6990, 7728, 8484, 9289, 10156, 11091, 12006, 13042, 14122, 15280, 16420, 17727, 18984, 20401, 21852
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). See A259572 for a guide to related sequences.

References

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

Crossrefs

Programs

  • Maple
    seq(add(add(floor(n*k/m),k=0..m-1),m=1..n), n=1..100); # Robert Israel, Jul 06 2015
  • Mathematica
    f[n_] := Sum[Floor[n*k/m], {m, n}, {k, 0, m - 1}]; Array[f, 50]
  • 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 */

Formula

a(n) = Sum_{m=1..n} Sum_{k=0..m-1} floor(n*k/m).

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.

A259578 Reciprocity array of 2; rectangular, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 17 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:
  2   2   2   2   2   2   2   2   2   2
  2   3   3   4   4   5   5   6   6   7
  2   3   3   5   6   6   8   9   9   11
  2   4   5   6   8   10  11  12  14  16
  2   4   6   8   10  12  14  16  18  20
  2   5   6   10  12  15  17  20  21  25
		

References

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

Crossrefs

Programs

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

Formula

T(m,n) = Sum_{k=0..m-1} [(n*k+x)/m] = Sum_{k=0..n-1} [(m*k+x)/n], where x = 2 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.

A259580 Sum of numbers in the n-th antidiagonal of the reciprocity array of 2.

Original entry on oeis.org

2, 5, 8, 17, 30, 50, 78, 116, 162, 227, 300, 389, 498, 628, 766, 940, 1128, 1347, 1584, 1855, 2146, 2486, 2838, 3236, 3660, 4135, 4626, 5177, 5754, 6392, 7050, 7776, 8524, 9353, 10204, 11127, 12078, 13114, 14170, 15328, 16500, 17775, 19068, 20461, 21900
Offset: 1

Views

Author

Clark Kimberling, Jul 17 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.

References

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

Crossrefs

Programs

  • Mathematica
    x = 2;  v[n_] := Sum[Sum[Floor[(n*k + x)/m], {k, 0, m - 1}], {m, 1, n}];
    Table[v[n], {n, 1, 120}]

Formula

a(n) = Sum_{m=1..n} Sum_{k=0..m-1} floor((n*k + x)/m), where x = 2.

A259581 Reciprocity array of 3; rectangular, read by antidiagonals.

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 6, 4, 3, 3, 5, 6, 6, 5, 3, 3, 5, 7, 6, 7, 5, 3, 3, 6, 9, 9, 9, 9, 6, 3, 3, 6, 9, 10, 10, 10, 9, 6, 3, 3, 7, 10, 12, 13, 13, 12, 10, 7, 3, 3, 7, 12, 12, 15, 15, 15, 12, 12, 7, 3, 3, 8, 12, 15, 17, 18, 18, 17, 15, 12, 8, 3
Offset: 1

Views

Author

Clark Kimberling, Jul 15 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:
  3   3   3   3   3   3   3   3   3   3
  3   3   4   4   5   5   6   6   7   7
  3   4   6   6   7   9   9   10  12  12
  3   4   6   6   9   10  12  12  15  16
  3   5   7   9   10  13  15  17  19  20
  3   5   9   10  13  15  18  20  24  25
		

References

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

Crossrefs

Programs

  • Mathematica
    x = 3;  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 = 3 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.

A259583 Sum of numbers in the n-th antidiagonal of the reciprocity array of 3.

Original entry on oeis.org

3, 6, 13, 19, 34, 55, 84, 120, 174, 231, 310, 399, 510, 634, 786, 948, 1144, 1359, 1602, 1863, 2176, 2496, 2860, 3256, 3680, 4147, 4662, 5189, 5782, 6412, 7080, 7792, 8574, 9369, 10228, 11151, 12114, 13132, 14230, 15344, 16540, 17805, 19110, 20481, 21948
Offset: 1

Views

Author

Clark Kimberling, Jul 15 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.

References

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

Crossrefs

Programs

  • Mathematica
    x = 3;  v[n_] := Sum[Sum[Floor[(n*k + x)/m], {k, 0, m - 1}], {m, 1, n}];
    Table[v[n], {n, 1, 120}]

Formula

a(n) = Sum_{m=1..n} Sum_{k=0..m-1} floor((n*k + x)/m), where x = 3.

A259573 Number of distinct differences in row n of the reciprocity array of 0.

Original entry on oeis.org

1, 2, 3, 4, 3, 4, 3, 6, 5, 6, 3, 8, 3, 6, 7, 8, 3, 8, 3, 8, 9, 6, 3, 12, 5, 6, 7, 10, 3, 14, 3, 10, 9, 6, 9, 14, 3, 6, 9, 12, 3, 12, 3, 12, 11, 6, 3, 18, 5, 10, 9, 12, 3, 12, 9, 14, 9, 6, 3, 22, 3, 6, 13, 12, 9, 14, 3, 12, 9, 14, 3, 18, 3, 6, 13, 12, 9, 16
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).

Examples

			In the array at A259572, row 4 is (0,2,3,6,6,8,9,12,12,14,15,...), with differences (2,1,3,0,2,1,3,0,2,1,3,0, ...), and distinct differences {0,1,2,3}, so that a(4) = 4. Example corrected by _Antti Karttunen_, Nov 30 2021
		

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}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]  (* A259573 *)
  • PARI
    A259572(m,n) = ((m*n - m - n + gcd(m,n))/2); \\ After Witold Dlugosz's formula for A259572.
    A259573(n) = #Set(vector(n,k,A259572(n,1+k)-A259572(n,k))); \\ Antti Karttunen, Nov 30 2021

A259576 Number of distinct differences in row n of the reciprocity array of 1.

Original entry on oeis.org

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, 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, 11, 10, 9, 14, 3, 10, 5, 16, 3, 18, 3, 6, 9, 10, 7, 14, 3
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

			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.
		

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}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]  (* A259576 *)
  • PARI
    A259575sq(m,n) = sum(k=0,m-1,(1+(n*k))\m);
    A259576(n) = #Set(vector(n,k,A259575sq(n,1+k)-A259575sq(n,k))); \\ Antti Karttunen, Mar 02 2023

A259577 Sum of numbers in the n-th antidiagonal of the reciprocity array of 1.

Original entry on oeis.org

1, 2, 6, 13, 26, 44, 72, 108, 156, 215, 290, 381, 486, 610, 758, 924, 1112, 1329, 1566, 1839, 2134, 2456, 2816, 3220, 3640, 4099, 4608, 5153, 5726, 6368, 7020, 7744, 8504, 9305, 10180, 11103, 12042, 13060, 14146, 15296, 16460, 17739, 19026, 20421, 21876
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.

References

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

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[Floor[(n*k + 1)/m], {m, n}, {k, 0, m - 1}]; Array[f, 50]
  • PARI
    a(n)=x=1;r=0;for(m=1,n,for(k=0,m-1,r=r+floor((n*k+x)/m)));return(r);
    main(size)=return(vector(size,n,a(n))) \\ Anders Hellström, Jul 06 2015
    
  • PARI
    a(n)=sum(m=1,n, sum(k=0,m-1, (n*k+1)\m)) \\ Charles R Greathouse IV, Mar 22 2017

Formula

a(n) = Sum_{m=1..n} Sum_{k=0..m-1} floor((n*k + x)/m), where x = 1.
a(n) = n^3 / 4 + O(n^2). - Charles R Greathouse IV, Mar 22 2017

A259579 Number of distinct differences in row n of the reciprocity array of 2.

Original entry on oeis.org

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, 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, 10, 5, 14, 3, 10, 9, 12, 3, 16, 3, 6, 11, 10, 9, 14, 3, 14
Offset: 1

Views

Author

Clark Kimberling, Jul 17 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

			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.
		

References

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

Crossrefs

Programs

  • Mathematica
    x = 2;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]
Showing 1-10 of 11 results. Next