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.

Showing 1-3 of 3 results.

A054535 Square array giving Ramanujan sum T(n,k) = c_n(k) = Sum_{m=1..n, (m,n)=1} exp(2 Pi i m k / n), read by antidiagonals upwards (n >= 1, k >= 1).

Original entry on oeis.org

1, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, -2, 2, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, -1, 2, -1, 1, 1, 0, -1, -2, -1, 0, 2, -1, 1, 0, 0, -1, -1, 4, -2, -1, 1, 1, 1, 0, 0, -1, 1, -1, 0, -1, -1, 1, -1, -1, -3, -4, -1, 2, -1, 2, 2, 1, 1, 0, -1, 1, 0, 0, -1, 1, -1, 0, -1, -1, 1, -1, 2, -1, -1, 0, 0, 6, -1, -1, -2, -1, 1, 1, 1, -1
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Replace the first column in A077049 with any k-th column in A177121 to get a new array. Then the matrix inverse of the new array will have the k-th column of A054535 (this array) as its first column. - Mats Granvik, May 03 2010
We have T(n, k) = c_n(k) = Sum_{m=1..n, (m,n)=1} exp(2 Pi i m k / n) and
A054534(n, k) = c_k(n) = Sum_{m=1..k, (m,k)=1} exp(2 Pi i m n / k). That is, the current array is the transpose of array A054534. Dirichlet g.f.'s for these two arrays are given below by R. J. Mathar and Mats Granvik. - Petros Hadjicostas, Jul 27 2019

Examples

			Square array T(n,k) = c_n(k) (with rows n >= 1 and columns k >= 1) starts as follows:
   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
  -1,  1, -1,  1, -1,  1, -1,  1, -1,  1, -1,  1, -1, ...
  -1, -1,  2, -1, -1,  2, -1, -1,  2, -1, -1,  2, -1, ...
   0, -2,  0,  2,  0, -2,  0,  2,  0, -2,  0,  2,  0, ...
  -1, -1, -1, -1,  4, -1, -1, -1, -1,  4, -1, -1, -1, ...
   1, -1, -2, -1,  1,  2,  1, -1, -2, -1,  1,  2,  1, ...
  -1, -1, -1, -1, -1, -1,  6, -1, -1, -1, -1, -1, -1, ...
   0,  0,  0, -4,  0,  0,  0,  4,  0,  0,  0, -4,  0, ...
   ... [example edited by _Petros Hadjicostas_, Jul 27 2019]
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, page 160.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Fifth ed., Oxford Science Publications, Clarendon Press, Oxford, 2003.
  • E. C. Titchmarsh and D. R. Heath-Brown, The theory of the Riemann zeta-function, 2nd ed., 1986.

Crossrefs

Transpose of array in A054534. Cf. A054532, A054533, A282634.
Cf. A086831=c_n(2) (2nd column), A085097=c_n(3) (3rd column), A085384=c_n(4) (4th column), A085639=c_n(5) (fifth column), A085906=c_n(6) (sixth column), A099837=c_3(n) (third row), A176742=c_4(n) (fourth row), A100051=c_6(n) (sixth row).

Programs

  • Maple
    with(numtheory): c:=(n,k)->phi(n)*mobius(n/gcd(n,k))/phi(n/gcd(n,k)): for n from 1 to 13 do seq(c(n+1-j,j),j=1..n) od; # gives the sequence in triangular form # Emeric Deutsch
    # to get the example above
    for n to 8 do
        seq(c(n, k), k = 1 .. 13);
    end do
    # Petros Hadjicostas, Jul 27 2019
  • Mathematica
    nmax = 14; t[n_, k_] := EulerPhi[n]*(MoebiusMu[n / GCD[n, k]] / EulerPhi[n / GCD[n, k]]); Flatten[ Table[t[n - k + 1, k], {n, 1, nmax}, {k, 1, n}]] (* Jean-François Alcover, Nov 10 2011, after Emeric Deutsch *)
    (* To get the example above in table format *)
    TableForm[Table[t[n, k], {n, 1, 8}, {k, 1, 13}]]
    (* Petros Hadjicostas, Jul 27 2019 *)

Formula

T(n,k) = c_n(k) = phi(n) * Moebius(n/gcd(n, k))/phi(n/gcd(n, k)). - Emeric Deutsch, Dec 23 2004 [The r.h.s. of this formula is known as the von Sterneck function, and it was introduced by him around 1900. - Petros Hadjicostas, Jul 20 2019]
Dirichlet series: Sum_{n>=1} c_n(k)/n^s = sigma_{1-s}(k)/zeta(s) where sigma is the sum-of-divisors function. Sum_{n>=1} c_k(n)/n^s = zeta(s)*Sum_{d|k} mu(k/d)*d^(1-s). [Hardy & Wright, Titchmarsh] - R. J. Mathar, Apr 01 2012 [We have sigma_{1-s}(k) = Sum_{d|k} d^{1-s} = Sum_{d|k} (k/d)^{1-s} = sigma_{s-1}(k) / k^{s-1}. - Petros Hadjicostas, Jul 27 2019]
From Mats Granvik, Oct 10 2016: (Start)
For n >= 1 and k >= 1 let
A(n,k) := if n mod k = 0 then k^r, otherwise 0;
B(n,k) := if n mod k = 0 then k/n^s, otherwise 0.
Then the Ramanujan's sum matrix equals
inverse(A).transpose(B) evaluated at s=0 and r=0.
Equals inverse(A051731).transpose(A127093).
Dirichlet g.f.: Sum_{n>=1} Sum_{k>=1} T(n,k)/(n^r*k^s) = zeta(s)*zeta(s + r - 1)/zeta(r) as in Wikipedia. (End)
T(n,k) = c_n(k) = Sum_{s | gcd(n,k)} s * Moebius(n/s). - Petros Hadjicostas, Jul 27 2019
Lambert series and a consequence: Sum_{n >= 1} c_n(k) * z^n / (1 - z^n) = Sum_{s|k} s * z^s and -Sum_{n >= 1} (c_n(k) / n) * log(1 - z^n) = Sum_{s|k} z^s for |z| < 1 (using the principal value of the logarithm). - Petros Hadjicostas, Aug 15 2019

Extensions

Name edited by Petros Hadjicostas, Jul 27 2019

A191904 Square array read by antidiagonals up: T(n,k) = 1-k if k divides n, else 1.

Original entry on oeis.org

0, 0, 1, 0, -1, 1, 0, 1, 1, 1, 0, -1, -2, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, -3, 1, 1, 1, 0, 1, -2, 1, 1, 1, 1, 1, 0, -1, 1, 1, -4, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -2, -3, 1, -5, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -6, 1, 1, 1, 1, 1, 1, 0, 1, -2, 1, -4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -3, 1, 1, 1, -7, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Transposed variant of A177121. Array variant of A176079.

Examples

			Table begins:
0..1..1..1..1..1..1..1..1...
0.-1..1..1..1..1..1..1..1...
0..1.-2..1..1..1..1..1..1...
0.-1..1.-3..1..1..1..1..1...
0..1..1..1.-4..1..1..1..1...
0.-1.-2..1..1.-5..1..1..1...
0..1..1..1..1..1.-6..1..1...
0.-1..1.-3..1..1..1.-7..1...
0..1.-2..1..1..1..1..1.-8...
		

Crossrefs

Programs

  • Mathematica
    nn = 30; t[n_, k_] := t[n, k] = If[Mod[n, k] == 0, -(k - 1), 1]; MatrixForm[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]

Formula

Conjecture: Sum_{n>=1} T(n,k)/n = log(k).
From Mats Granvik, Apr 24 2022: (Start)
Sum recurrence:
T(n, 1) = [n >= 1]*0;
T(n, k) = [n < k]*1;
T(n, k) = [n >= k](Sum_{i=1..k-1} T(n - i, k - 1) - Sum_{i=1..k-1} T(n - i, k)).
Product recurrence:
T(n, 1) = [n >= 1]*0;
T(n, k) = [n < k]*1;
T(n, k) = [n >= k](Product_{i=1..k-1} T(n - i, k - 1) - Product_{i=1..k-1} T(n - i, k)).
(End)

A191907 Square array read by antidiagonals up: T(n,k) = -(n-1) if n divides k, else 1.

Original entry on oeis.org

0, 1, 0, 1, -1, 0, 1, 1, 1, 0, 1, 1, -2, -1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, -3, 1, -1, 0, 1, 1, 1, 1, 1, -2, 1, 0, 1, 1, 1, 1, -4, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -5, 1, -3, -2, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -6, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -4, 1, -2, 1, 0, 1, 1, 1, 1, 1, 1, 1, -7, 1, 1, 1, -3, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Apart from the top row, the same as A177121.
Sum_{k>=1} T(n,k)/k = log(n); this has been pointed out by Jaume Oliver Lafont in A061347 and A002162.

Examples

			Table starts:
0..0..0..0..0..0..0..0..0...
1.-1..1.-1..1.-1..1.-1..1...
1..1.-2..1..1.-2..1..1.-2...
1..1..1.-3..1..1..1.-3..1...
1..1..1..1.-4..1..1..1..1...
1..1..1..1..1.-5..1..1..1...
1..1..1..1..1..1.-6..1..1...
1..1..1..1..1..1..1.-7..1...
1..1..1..1..1..1..1..1.-8...
		

Crossrefs

Programs

  • Mathematica
    Clear[t, n, k];
    nn = 30;
    t[n_, k_] := t[n, k] = If[Mod[n, k] == 0, -(k - 1), 1]
    MatrixForm[Transpose[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]]
  • PARI
    N=20; M=matrix(N,N,n,k, if(n%k==0,1-k,1))~

Formula

If n divides k then T(n,k) = -(n-1) else 1.
Showing 1-3 of 3 results.