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.

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

The Ramanujan sum is also known as the von Sterneck arithmetic function. Robert Daublebsky von Sterneck introduced it around 1900. - Petros Hadjicostas, Jul 20 2019
T(n, k) = c_k(n) is the sum of the n-th powers of the k-th primitive roots of unity. - Petros Hadjicostas, Jul 27 2019

Examples

			Array T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:
  1, -1, -1,  0, -1,  1, -1,  0,  0,  1, -1, ...
  1,  1, -1, -2, -1, -1, -1,  0,  0, -1, -1, ...
  1, -1,  2,  0, -1, -2, -1,  0, -3,  1, -1, ...
  1,  1, -1,  2, -1, -1, -1, -4,  0, -1, -1, ...
  1, -1, -1,  0,  4,  1, -1,  0,  0, -4, -1, ...
  1,  1,  2, -2, -1,  2, -1,  0, -3, -1, -1, ...
  1, -1, -1,  0, -1,  1,  6,  0,  0,  1, -1, ...
  ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, page 160.
  • H. Rademacher, Collected Papers of Hans Rademacher, vol. II, MIT Press, 1974, p. 435.
  • S. Ramanujan, On Certain Trigonometrical Sums and their Applications in the Theory of Numbers, pp. 179-199 of Collected Papers of Srinivasa Ramanujan, Ed. G. H. Hardy et al., AMS Chelsea Publishing 2000.
  • R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Acad. Wiss. Sapientiae Math.-Naturwiss. Kl. 111 (1902), 1567-1601 (Abt. IIa).

Crossrefs

Programs

  • Mathematica
    nmax = 14; mu[n_Integer] = MoebiusMu[n]; mu[] = 0; t[n, k_] := Total[ #*mu[k/#]& /@ Divisors[n]]; Flatten[ Table[ t[n-k+1, k], {n, 1, nmax}, {k, 1, n}]] (* Jean-François Alcover, Nov 14 2011, after Pari *)
    TableForm[Table[t[n, k], {n, 1, 7}, {k, 1, 11}]] (* to print a table like the one in the example - Petros Hadjicostas, Jul 27 2019 *)
  • PARI
    {T(n, k) = if( n<1 || k<1, 0, sumdiv( n, d, if( k%d==0, d * moebius(k / d))))} /* Michael Somos, Dec 05 2002 */
    
  • PARI
    {T(n, k) = if( n<1 || k<1, 0, polsym( polcyclo( k), n) [n + 1])} /* Michael Somos, Mar 21 2011 */
    
  • PARI
    /*To get an array like in the example above using Michael Somos' programs:*/
    {for (n=1, 20, for (k=1, 40, print1(T(n,k), ","); ); print(); ); } /* Petros Hadjicostas, Jul 27 2019 */

Formula

T(n, 1) = c_1(n) = 1. T(n, 2) = c_2(n) = A033999(n). T(n, 3) = c_3(n) = A099837(n) if n>1. T(n, 4) = c_4(n) = A176742(n) if n>1. T(n, 6) = c_6(n) = A100051(n) if n>1. - Michael Somos, Mar 21 2011
T(1, n) = c_n(1) = A008683(n). T(2, n) = c_n(2) = A086831(n). T(3, n) = c_n(3) = A085097(n). T(4, n) = c_n(4) = A085384(n). T(5, n) = c_n(5) = A085639(n). T(6, n) = c_n(6) = A085906(n). - Michael Somos, Mar 21 2011
T(n, n) = T(k * n, n) = A000010(n), T(n, 2*n) = -A062570(n). - Michael Somos, Mar 21 2011
Lambert series and a consequence: Sum_{k >= 1} c_k(n) * z^k / (1 - z^k) = Sum_{s|n} s * z^s and -Sum_{k >= 1} (c_k(n) / k) * log(1 - z^k) = Sum_{s|n} z^s for |z| < 1 (using the principal value of the logarithm). - Petros Hadjicostas, Aug 15 2019