%I #95 Aug 22 2019 09:19:47
%S 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,
%T 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,
%U 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
%N 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).
%C 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
%C 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
%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, page 160.
%D H. Rademacher, Collected Papers of Hans Rademacher, vol. II, MIT Press, 1974, p. 435.
%D 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.
%D R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Acad. Wiss. Sapientiae Math.-Naturwiss. Kl. 111 (1902), 1567-1601 (Abt. IIa).
%H Seiichi Manyama, <a href="/A054534/b054534.txt">Antidiagonals n = 1..140, flattened</a>
%H Tom M. Apostol, <a href="https://projecteuclid.org/download/pdf_1/euclid.pjm/1102968273">Arithmetical properties of generalized Ramanujan sums</a>, Pacific J. Math. 41 (1972), 281-293.
%H Austrian Biographical Encyclopedia from 1815 onwards, <a href="https://www.biographien.ac.at/oebl/oebl_D/Daublebsky-Sterneck_Robert_1871_1928.xml">Daublebsky von Sterneck, Robert</a>.
%H Eckford Cohen, <a href="https://dx.doi.org/10.1073/pnas.41.11.939">A class of arithmetic functions</a>, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
%H A. Elashvili, M. Jibladze, and D. Pataraia, <a href="http://dx.doi.org/10.1023/A:1018727630642">Combinatorics of necklaces and "Hermite reciprocity"</a>, J. Algebraic Combin. 10 (1999), 173-188.
%H M. L. Fredman, <a href="https://doi.org/10.1016/0097-3165(75)90008-4">A symmetry relationship for a class of partitions</a>, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
%H Emiliano Gagliardo, <a href="http://www.bdim.eu/item?id=BUMI_1953_3_8_3_269_0">Le funzioni simmetriche semplici delle radici n-esime primitive dell'unità</a>, Bollettino dell'Unione Matematica Italiana Serie 3, 8(3) (1953), 269-273.
%H Otto Hölder, <a href="http://matwbn.icm.edu.pl/ksiazki/pmf/pmf43/pmf4312.pdf">Zur Theorie der Kreisteilungsgleichung K_m(x)=0</a>, Prace mat.-fiz. 43 (1936), 13-23.
%H Peter H. van der Kamp, <a href="http://emis.impa.br/EMIS/journals/INTEGERS/papers/n24/n24.Abstract.html">On the Fourier transform of the greatest common divisor</a>, Integers 13 (2013), #A24. [See Section 3 for historical remarks.]
%H C. A. Nicol, <a href="https://dx.doi.org/10.1073/pnas.39.9.963">On restricted partitions and a generalization of the Euler phi number and the Moebius function</a>, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
%H C. A. Nicol and H. S. Vandiver, <a href="https://dx.doi.org/10.1073/pnas.40.9.825 ">A von Sterneck arithmetical function and restricted partitions with respect to a modulus</a>, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
%H K. G. Ramanathan, <a href="https://www.ias.ac.in/article/fulltext/seca/020/01/0062-0069">Some applications of Ramanujan's trigonometrical sum C_m(n)</a>, Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
%H Srinivasa Ramanujan, <a href="http://ramanujan.sirinudi.org/Volumes/published/ram21.pdf">On certain trigonometric sums and their applications in the theory of numbers</a>, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
%H M. V. Subbarao, <a href="https://www.jstor.org/stable/2310974">The Brauer-Rademacher identity</a>, Amer. Math. Monthly 72 (1965), 135-138.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Ramanujan%27s_sum">Ramanujan's sum</a>.
%H Wikipedia, <a href="https://de.wikipedia.org/wiki/Robert_Daublebsky_von_Sterneck_der_J%C3%BCngere">Robert Daublebsky von Sterneck der Jüngere</a>.
%H Aurel Wintner, <a href="https://www.jstor.org/stable/2371672">On a statistics of the Ramanujan sums</a>, Amer. J. Math., 64(1) (1942), 106-114.
%F 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
%F 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
%F T(n, n) = T(k * n, n) = A000010(n), T(n, 2*n) = -A062570(n). - _Michael Somos_, Mar 21 2011
%F 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
%e Array T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:
%e 1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, ...
%e 1, 1, -1, -2, -1, -1, -1, 0, 0, -1, -1, ...
%e 1, -1, 2, 0, -1, -2, -1, 0, -3, 1, -1, ...
%e 1, 1, -1, 2, -1, -1, -1, -4, 0, -1, -1, ...
%e 1, -1, -1, 0, 4, 1, -1, 0, 0, -4, -1, ...
%e 1, 1, 2, -2, -1, 2, -1, 0, -3, -1, -1, ...
%e 1, -1, -1, 0, -1, 1, 6, 0, 0, 1, -1, ...
%e ...
%t 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 *)
%t 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 *)
%o (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 */
%o (PARI) {T(n, k) = if( n<1 || k<1, 0, polsym( polcyclo( k), n) [n + 1])} /* _Michael Somos_, Mar 21 2011 */
%o (PARI) /*To get an array like in the example above using _Michael Somos_' programs:*/
%o {for (n=1, 20, for (k=1, 40, print1(T(n,k), ","); ); print(); ); } /* _Petros Hadjicostas_, Jul 27 2019 */
%Y Cf. A000010, A033999, A054532, A054533, A054535, A062570, A085097, A058384, A085639, A085906, A099837, A100051, A176742, A282634.
%K sign,tabl,nice
%O 1,13
%A _N. J. A. Sloane_, Apr 09 2000