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.
%I A278715 #17 Feb 16 2025 08:33:37 %S A278715 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 A278715 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 A278715 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 A278715 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 A278715 For the denominators see A278716. %C A278715 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 A278715 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 A278715 Apostol, Tom, M., Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990. %D A278715 Ayoub, R., An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963. %H A278715 G. C. Greubel, <a href="/A278715/b278715.txt">Rows n=2..100 of triangle, flattened</a> %H A278715 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DedekindSum.html">Dedekind Sum</a>. %F A278715 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 A278715 The triangle T(k,h) begins (if gcd(k,h) is not 1 we use o instead of 0): %e A278715 k\h 1 2 3 4 5 6 7 8 9 10 11 12 %e A278715 2: 0 %e A278715 3: 1 -1 %e A278715 4: 1 o -1 %e A278715 5: 1 0 0 -1 %e A278715 6: 5 o o o -5 %e A278715 7: 5 1 -1 1 -1 -5 %e A278715 8: 7 o 1 o -1 o -7 %e A278715 9: 14 4 o -4 4 o -4 -14 %e A278715 10: 3 o 0 o o o 0 o -3 %e A278715 11: 15 5 3 3 -5 5 -3 -3 -5 -15 %e A278715 12: 55 o o o -1 o 1 o o o -55 %e A278715 13: 11 4 1 -1 0 -4 4 0 1 -1 -4 -11 %e A278715 ... %e A278715 n = 14: 13 o 3 o 3 o o o -3 o -3 o -13, %e A278715 n = 15: 91 7 0 19 0 0 -7 7 0 0 -19 0 -7 -91. %e A278715 ... %e A278715 --------------------------------------------- %e A278715 The rational triangle s(h,k) begins (here o is used if gcd(h,k) is not 1): %e A278715 k\h 1 2 3 4 5 6 7 %e A278715 2: 0 %e A278715 3: 1/18 -1/18 %e A278715 4: 1/8 o -1/8 %e A278715 5: 1/5 0 0 -1/5 %e A278715 6: 5/18 o o o -5/18 %e A278715 7: 5/14 1/14 -1/14 1/14 -1/14 -5/14 %e A278715 8: 7/16 o 1/16 o -1/16 o -7/16 %e A278715 ... %e A278715 n = 9: 14/27 4/27 o -4/27 4/27 o -4/27 -14/27, %e A278715 n = 10: 3/5 o 0 o o o 0 o -3/5, %e A278715 n = 11: 15/22 5/22 3/22 3/22 -5/22 5/22 -3/22 -3/22 -5/22 -15/22, %e A278715 n = 12: 55/72 o o o -1/72 o 1/72 o o o -55/72, %e A278715 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 A278715 n = 14: 13/14 o 3/14 o 3/14 o o o -3/14 o -3/14 o -13/14, %e A278715 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 A278715 ... %e A278715 -------------------------------------------- %t A278715 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 A278715 (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 A278715 for(n=2,15, for(k=1,n-1, print1(numerator(T(n,k)), ", "))) \\ _G. C. Greubel_, Nov 22 2018 %o A278715 (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 A278715 (Sage) %o A278715 def T(n,k): %o A278715 if gcd(n,k)==1: %o A278715 return numerator(sum((j/n)*(k*j/n - floor(k*j/n) - 1/2) for j in (1..(n-1)))) %o A278715 elif gcd(n,k)!=1: %o A278715 return 0 %o A278715 else: %o A278715 0 %o A278715 [[T(n,k) for k in (1..n-1)] for n in (2..15)] # _G. C. Greubel_, Nov 22 2018 %Y A278715 Cf. A278716, A264388/A264389 (h=1), A278713/A278714 (h=2 odd k). %K A278715 sign,tabl,frac,easy %O A278715 2,11 %A A278715 _Wolfdieter Lang_, Nov 28 2016