OFFSET
1,2
COMMENTS
Row n gives the number of entries equal to k*n in the n X n multiplication table with indices 0 <= i, j < n.
Equivalently, T(n,k) counts ordered factor pairs of the multiple k*n that lie within the n X n multiplication table.
If A(n,q,r) = #{(i,j) : 0 <= i,j < n and i*j = q*n + r}, then T(n,k) = A(n,k,0), so T(n,k) is the r=0 slice of this array.
LINKS
Ruud H.G. van Tol, Table of n, a(n) for n = 1..10440 (144 rows)
Frédéric D. W. Heidenthal-König, Divisor-Window Formula for the Euclidean Decomposition of the Multiplication Table, Zenodo, 2026.
FORMULA
T(n,0) = 2*n - 1.
T(n,k) = #{(i,j) : 0 <= i,j < n and i*j = k*n}.
For k > 0, T(n,k) = #{d | k*n : d < n and (k*n)/d < n}.
For k > 0, equivalently T(n,k) = #{d | (k*n) : k < d < n}.
Sum_{k=0..n-1} T(n,k) = A018804(n).
EXAMPLE
Rows for n = 1 to 12:
n=1: 1;
n=2: 3, 0;
n=3: 5, 0, 0;
n=4: 7, 1, 0, 0;
n=5: 9, 0, 0, 0, 0;
n=6: 11, 2, 2, 0, 0, 0;
n=7: 13, 0, 0, 0, 0, 0, 0;
n=8: 15, 2, 1, 2, 0, 0, 0, 0;
n=9: 17, 1, 2, 0, 1, 0, 0, 0, 0;
n=10: 19, 2, 2, 2, 2, 0, 0, 0, 0, 0;
n=11: 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
n=12: 23, 4, 4, 3, 2, 2, 2, 0, 0, 0, 0, 0.
PROG
(Python)
def row(n):
counts = [0] * n
for i in range(n):
for j in range(n):
if (i * j) % n == 0:
counts[(i * j) // n] += 1
return counts
# triangle:
a = []
for n in range(1, 13):
a.extend(row(n))
print(a)
(PARI) T(n, k) = sum(i=0, n-1, sum(j=0, n-1, i*j == k*n));
row(n) = vector(n, i, T(n, i-1)); \\ Michel Marcus, Mar 06 2026
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Frédéric D. W. Heidenthal-König, Feb 26 2026
STATUS
approved
