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.

A278716 Triangle read by rows: T(k, h) gives the denominators of the Dedekind sums s(h, k) with gcd(h, k) = 1 or 0 otherwise.

Original entry on oeis.org

1, 18, 18, 8, 1, 8, 5, 1, 1, 5, 18, 1, 1, 1, 18, 14, 14, 14, 14, 14, 14, 16, 1, 16, 1, 16, 1, 16, 27, 27, 1, 27, 27, 1, 27, 27, 5, 1, 1, 1, 1, 1, 1, 1, 5, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 72, 1, 1, 1, 72, 1, 72, 1, 1, 1, 72, 13, 13, 13, 13, 1, 13, 13, 1, 13, 13, 13, 13
Offset: 2

Views

Author

Wolfdieter Lang, Nov 28 2016

Keywords

Comments

For the numerators see A278715, also for references and details of the Dedekind sums s(h, k).

Examples

			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.
...
		

Crossrefs

Cf. A278715.

Programs

  • 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
    
  • 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 *)
  • 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
    
  • 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

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).