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-5 of 5 results.

A054533 Triangular array giving Ramanujan sum T(n,k) = c_n(k) = Sum_{m=1..n, (m,n)=1} exp(2 Pi i m k / n) for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

From Wolfdieter Lang, Jan 06 2017: (Start)
Periodicity: c_n(k+n) = c_n(k). See the Apostol reference p. 161.
Multiplicativity: c_n(k)*c_m(k) = c_{n*m}(k), if gcd(n,m) = 1. For the proof see the Hardy reference, p. 138.
Dirichlet g.f. for fixed k: D(n,s) := Sum_{n>=1} c_n(k)/n^s = sigma_{1-s}(k)/zeta(s) = sigma_{s-1}(k)/(k^(s-1)*zeta(s)) for s > 1, with sigma_m(k) the sum of the m-th power of the divisors of k. See the Hardy reference, eqs. (9.6.1) and (9.6.2), pp. 139-140, or Hardy-Wright, Theorem 292, p. 250.
Sum_{n>=1} c_n(k)/n = 0. See the Hardy reference, p. 141. (End)
Right border gives A000010. - Omar E. Pol, May 08 2018
Fredman (1975) proved that the number S(n, k, v) of vectors (a_0, ..., a_{n-1}) of nonnegative integer components that satisfy a_0 + ... + a_{n-1} = k and Sum_{i=0..n-1} i*a_i = v (mod n) is given by S(n, k, v) = (1/(n + k)) * Sum_{d | gcd(n, k)} T(d, v) * binomial((n + k)/d, k/d) = S(k, n, v). This was also proved by Elashvili et al. (1999), who also proved that S(n, k, v) = Sum_{d | gcd(n, k, v)} S(n/d, k/d, 1). Here, S(n, k, 1) = A051168(n + k, k). - Petros Hadjicostas, Jul 09 2019
We have T(n, k) = c_n(k) = Sum_{m=1..n, (m,n)=1} exp(2 Pi i m k / n) and A054532(n, k) = c_k(n) = Sum_{m=1..k, (m,k)=1} exp(2 Pi i m n / k) for n >= 1 and 1 <= k <= n. - Petros Hadjicostas, Jul 27 2019

Examples

			Triangle begins
   1;
  -1,  1;
  -1, -1,  2;
   0, -2,  0,  2;
  -1, -1, -1, -1,  4;
   1, -1, -2, -1,  1,  2;
  -1, -1, -1, -1, -1, -1,  6;
   0,  0,  0, -4,  0,  0,  0,  4;
   0,  0, -3,  0,  0, -3,  0,  0,  6;
   1, -1,  1, -1, -4, -1,  1, -1,  1,  4;
  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10;
   0,  2,  0, -2,  0, -4,  0, -2,  0,  2,  0,  4;
  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12;
   ...
[Edited by _Jon E. Schoenfield_, Jan 03 2017]
Periodicity and multiplicativity: c_6(k) = c_2(k)*c_3(k), e.g.: 2 = c_6(6) = c_2(6)*c_3(6) = c_2(2)*c_3(3) = 1*2 = 2. - _Wolfdieter Lang_, Jan 05 2017
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, pp. 160-161.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, pp. 137-139.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Fifth ed., Oxford Science Publications, Clarendon Press, Oxford, 2003, pp. 237-238.

Crossrefs

Programs

  • Mathematica
    c[k_, n_] := Sum[ If[GCD[m, k] == 1, Exp[2 Pi*I*m*n/k], 0], {m, 1, k}]; A054533 = Flatten[ Table[c[n, k] // FullSimplify, {n, 1, 14}, {k, 1, n}] ] (* Jean-François Alcover, Jun 27 2012 *)
    (* to get the triangle in the example above *)
    FormTable[Table[c[n, k] // FullSimplify, {n, 1, 13}, {k, 1, n}]]
    (* Petros Hadjicostas, Jul 28 2019 *)
  • PARI
    T(n,k) = sumdiv(gcd(n,k), d, d*moebius(n/d));
    tabl(nn) = {for(n=1, nn, for(k=1, n, print1(T(n,k), ", "); ); print(); ); }; \\ Michel Marcus, Jun 14 2018

Formula

T(n, k) = Sum_{m=1..n, gcd(m,n) = 1} exp(2*Pi*i*m*k / n), n >= 1, 1 <= k <= n, where i is the imaginary unit.
T(n, k) = Sum_{d | gcd(n,k)} d*Moebius(n/d), n >= 1, 1 <= k <= n.

Extensions

Name edited by Petros Hadjicostas, Jul 27 2019

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

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

A054532 Ramanujan sum T(n, k) = c_k(n) = Sum_{m=1..k, (m,k)=1} exp(2*Pi*i*m*n / k), triangular array read by rows for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

T(n, k) = c_k(n) = sum of the n-th powers of the k-th primitive roots of unity. - Petros Hadjicostas, Jul 27 2019

Examples

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

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, page 160.

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := Sum[ c = Exp[2*Pi*I*m*(n/k)]; If[ GCD[m, k] == 1, c, 0], {m, 1, k}] // FullSimplify; Flatten[ Table[ t[n, k], {n, 1, 15}, {k, 1, n}]] (* Jean-François Alcover, Mar 15 2012 *)
    (* to get the triangle in the example *)
    TableForm[Table[t[n, k], {n, 1, 9}, {k, 1, n}]]
    (* Petros Hadjicostas, Jul 27 2019 *)

Formula

T(n, k) = c_k(n) = Sum_{m=1..k, (m,k)=1} cos(2*Pi*m*n / k) = mu(k/gcd(k,n)) * phi(k) / phi(k/gcd(k,n)) = Sum_{d | gcd(k,n)} mu(k/d) * d. (All formulas were proved by Kluyver (1906, p. 410).) - Petros Hadjicostas, Aug 20 2019

A298983 Triangle read by rows T(n,k) giving coefficients in expansion of Product_{j=1..n} (1-x^j)^2 mod x^(n+1)-1.

Original entry on oeis.org

1, 2, -2, 6, -3, -3, 8, 0, -8, 0, 20, -5, -5, -5, -5, 12, 6, -6, -12, -6, 6, 42, -7, -7, -7, -7, -7, -7, 32, 0, 0, 0, -32, 0, 0, 0, 54, 0, 0, -27, 0, 0, -27, 0, 0, 40, 10, -10, 10, -10, -40, -10, 10, -10, 10, 110, -11, -11, -11, -11, -11, -11, -11, -11, -11, -11
Offset: 0

Views

Author

Seiichi Manyama, Mar 10 2018

Keywords

Examples

			Triangle begins:
  k   0    1    2    3    4    5    6
n
0     1;
1     2,  -2;
2     6,  -3,  -3;
3     8,   0,  -8,   0;
4    20,  -5,  -5,  -5,  -5;
5    12,   6,  -6, -12,  -6,   6;
6    42,  -7,  -7,  -7,  -7,  -7,  -7;
		

Crossrefs

Formula

T(n,k) = (n+1) * Sum_{d | gcd(n+1,n+1-k)} d*mu((n+1)/d) for 0 <= k <= n.
So T(n,0) = A002618(n+1) and T(n,n) = A055615(n+1).
Showing 1-5 of 5 results.