login
Table T read by rows. T(k, h) gives the numerators of the Dedekind sums s(h, k) with gcd(h, k) = 1 or 0 otherwise.
2

%I #16 Sep 08 2022 08:46:18

%S 0,1,-1,1,0,-1,1,0,0,-1,5,0,0,0,-5,5,1,-1,1,-1,-5,7,0,1,0,-1,0,-7,14,

%T 4,0,-4,4,0,-4,-14,3,0,0,0,0,0,0,0,-3,15,5,3,3,-5,5,-3,-3,-5,-15,55,0,

%U 0,0,-1,0,1,0,0,0,-55,11,4,1,-1,0,-4,4,0,1,-1,-4,-11,13,0,3,0,3,0,0,0,-3,0,-3,0,-13,91,7,0,19,0,0,-7,7,0,0,-19,0,-7,-91

%N Table T read by rows. T(k, h) gives the numerators of the Dedekind sums s(h, k) with gcd(h, k) = 1 or 0 otherwise.

%C For the denominators see A278716.

%C The Dedekind sums are s(h,k) = Sum_{r=1..k-1} (r/k)*(h*r/k - floor(h*r/k) - 1/2) = Sum_{r=1..k-1} ((r/k))*((h*r)/k) with the period 1 sawtooth function ((x)) = x - floor(x) - 1/2 if x is not an integer and 0 otherwise. One assumes gcd(h,k) = 1, and for other h, k values the table has 0's. See the references Apostol pp. 52, 61-69, 72-73 and Ayoub pp. 168, 191. See also the Weisstein link.

%C In order to have a regular triangle T(k, h) one starts with k >= 2 and h = 1, 2, ..., k-1. s(1,1) = 0.

%D Apostol, Tom, M., Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990.

%D Ayoub, R., An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963.

%H G. C. Greubel, <a href="/A278715/b278715.txt">Rows n=2..100 of triangle, flattened</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DedekindSum.html">Dedekind Sum</a>.

%F T(k ,h) = numerator(s(h,k)) with the Dedekind sums s(h,k) given in a comment above and gcd(h,k) = 1. k >=2, h = 1, 2, ..., k-1. If gcd(h,k) is not 1 then T(k,h) is put to 0 (in the example o is used). Note that T(k,h) can vanish also for gcd(h,k) = 1.

%e The triangle T(k,h) begins (if gcd(k,h) is not 1 we use o instead of 0):

%e k\h 1 2 3 4 5 6 7 8 9 10 11 12

%e 2: 0

%e 3: 1 -1

%e 4: 1 o -1

%e 5: 1 0 0 -1

%e 6: 5 o o o -5

%e 7: 5 1 -1 1 -1 -5

%e 8: 7 o 1 o -1 o -7

%e 9: 14 4 o -4 4 o -4 -14

%e 10: 3 o 0 o o o 0 o -3

%e 11: 15 5 3 3 -5 5 -3 -3 -5 -15

%e 12: 55 o o o -1 o 1 o o o -55

%e 13: 11 4 1 -1 0 -4 4 0 1 -1 -4 -11

%e ...

%e n = 14: 13 o 3 o 3 o o o -3 o -3 o -13,

%e n = 15: 91 7 0 19 0 0 -7 7 0 0 -19 0 -7 -91.

%e ...

%e ---------------------------------------------

%e The rational triangle s(h,k) begins (here o is used if gcd(h,k) is not 1):

%e k\h 1 2 3 4 5 6 7

%e 2: 0

%e 3: 1/18 -1/18

%e 4: 1/8 o -1/8

%e 5: 1/5 0 0 -1/5

%e 6: 5/18 o o o -5/18

%e 7: 5/14 1/14 -1/14 1/14 -1/14 -5/14

%e 8: 7/16 o 1/16 o -1/16 o -7/16

%e ...

%e n = 9: 14/27 4/27 o -4/27 4/27 o -4/27 -14/27,

%e n = 10: 3/5 o 0 o o o 0 o -3/5,

%e n = 11: 15/22 5/22 3/22 3/22 -5/22 5/22 -3/22 -3/22 -5/22 -15/22,

%e n = 12: 55/72 o o o -1/72 o 1/72 o o o -55/72,

%e n = 13: 11/13 4/13 1/13 -1/13 0 -4/13 4/13 0 1/13 -1/13 -4/13 -11/13,

%e n = 14: 13/14 o 3/14 o 3/14 o o o -3/14 o -3/14 o -13/14,

%e n = 15: 1/90 7/18 o 19/90 o o -7/18 7/18 o o -19/90 o -7/18 -91/90.

%e ...

%e --------------------------------------------

%t 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]; Numerator[Table[T[n, k], {n,2,15}, {k,1,n-1}]] //Flatten (* _G. C. Greubel_, Nov 22 2018 *)

%o (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)};

%o for(n=2,15, for(k=1,n-1, print1(numerator(T(n,k)), ", "))) \\ _G. C. Greubel_, Nov 22 2018

%o (Magma) [[GCD(n,k) eq 1 select Numerator((&+[(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..15]]; // _G. C. Greubel_, Nov 22 2018

%o (Sage)

%o def T(n,k):

%o if gcd(n,k)==1:

%o return numerator(sum((j/n)*(k*j/n - floor(k*j/n) - 1/2) for j in (1..(n-1))))

%o elif gcd(n,k)!=1:

%o return 0

%o else:

%o 0

%o [[T(n,k) for k in (1..n-1)] for n in (2..15)] # _G. C. Greubel_, Nov 22 2018

%Y Cf. A278716, A264388/A264389 (h=1), A278713/A278714 (h=2 odd k).

%K sign,tabl,frac,easy

%O 2,11

%A _Wolfdieter Lang_, Nov 28 2016