OFFSET
2,2
COMMENTS
For the numerators see A278715, also for references and details of the Dedekind sums s(h, k).
LINKS
G. C. Greubel, Rows n=2..100 of triangle, flattened
FORMULA
T(k ,h) = denominator(s(h,k)) with the Dedekind sums s(h,k) given in a comment on A278715 and gcd(h,k) = 1. k >= 2, h = 1, 2, ..., k-1. If gcd(h,k) > 1 then T(h, k) = 1 (from s(h,k) put to 0).
EXAMPLE
The triangle T(k, h) begins (here l is used if gcd(h, k) > 1 instead of 1):
k\h 1 2 3 4 5 6 7 8 9 10 11 12
2: 1
3: 18 18
4: 8 l 8
5: 5 1 1 5
6: 18 l l l 18
7: 14 14 14 14 14 14
8: 16 l 16 l 16 l 16
9: 27 27 l 27 27 l 27 27
10: 5 l 1 l l l 1 l 5
11: 22 22 22 22 22 22 22 22 22 22
12: 72 l l l 72 l 72 l l l 72
13: 13 13 13 13 1 13 13 1 13 13 13 13
...
n = 14: 14 l 14 l 14 l l l 14 l 14 l 14,
n = 15: 90 18 l 90 l l 18 18 l l 90 l 18 90.
...
MATHEMATICA
T[n_, k_]:= If[GCD[n, k] == 1, Sum[(j/n)*(k*j/n - Floor[k*j/n] - 1/2), {j, 1, n - 1}], 0]; Denominator[Table[T[n, k], {n, 2, 15}, {k, 1, n - 1}]]//Flatten (* G. C. Greubel, Nov 22 2018 *)
PROG
(PARI) {T(n, k) = if(gcd(n, k)==1, sum(j=1, n-1, (j/n)*(k*j/n - floor(k*j/n) - 1/2)), 0)};
for(n=2, 15, for(k=1, n-1, print1(denominator(T(n, k)), ", "))) \\ G. C. Greubel, Nov 22 2018
(Magma) [[GCD(n, k) eq 1 select Denominator((&+[(j/n)*(k*j/n - Floor(k*j/n) - 1/2): j in [1..(n-1)]])) else 0: k in [1..(n-1)]]: n in [2..10]]; // G. C. Greubel, Nov 22 2018
(Sage)
def T(n, k):
if gcd(n, k)==1:
return denominator(sum((j/n)*(k*j/n - floor(k*j/n) - 1/2) for j in (1..(n-1))))
elif gcd(n, k)!=1:
return 0
else:
0
[[T(n, k) for k in (1..n-1)] for n in (2..15)] # G. C. Greubel, Nov 22 2018
CROSSREFS
KEYWORD
AUTHOR
Wolfdieter Lang, Nov 28 2016
STATUS
approved