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-6 of 6 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

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

A085906 Ramanujan sum c_n(6).

Original entry on oeis.org

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

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 16 2003

Keywords

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.

Crossrefs

Cf. A086831, A085097, A085384, A085639 for Ramanujan sums c_n(2) .. c_n(5).

Programs

  • Mathematica
    f[list_, i_] := list[[i]]; nn = 105; a =Table[MoebiusMu[n], {n, 1, nn}]; b =Table[If[IntegerQ[6/n], n, 0], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Dec 30 2015 *)
    f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := Switch[e, 1, 1, 2, -2, , 0]; f[3, e] := Switch[e, 1, 2, 2, -3, , 0]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 21 2024 *)
  • PARI
    a(n)=eulerphi(n)*moebius(n/gcd(n,6))/eulerphi(n/gcd(n,6))

Formula

a(n) = phi(n)*mu(n/gcd(n, 6)) / phi(n/gcd(n, 6)).
Dirichlet g.f. (1+2^(1-s)+3^(1-s)+6^(1-s))/zeta(s). - R. J. Mathar, Mar 26 2011
Lambert series and a consequence: Sum_{n >= 1} c_n(6) * z^n / (1 - z^n) = Sum_{s|6} s * z^s and -Sum_{n >= 1} (c_n(6) / n) * log(1 - z^n) = Sum_{s|6} z^s for |z| < 1 (using the principal value of the logarithm). - Petros Hadjicostas, Aug 24 2019
From Amiram Eldar, Jan 21 2024: (Start)
Multiplicative with a(2) = 1, a(2^2) = -2, and a(2^e) = 0 for e >= 3, a(3) = 2, a(3^2) = -3, and a(3^e) = 0 for e >= 3, and for a prime p >= 5, a(p) = -1, and a(p^e) = 0 for e >= 2.
Sum_{k=1..n} abs(a(k)) ~ (12/Pi^2) * n. (End)

Extensions

More terms from Benoit Cloitre, Aug 18 2003

A086831 Ramanujan sum c_n(2).

Original entry on oeis.org

1, 1, -1, -2, -1, -1, -1, 0, 0, -1, -1, 2, -1, -1, 1, 0, -1, 0, -1, 2, 1, -1, -1, 0, 0, -1, 0, 2, -1, 1, -1, 0, 1, -1, 1, 0, -1, -1, 1, 0, -1, 1, -1, 2, 0, -1, -1, 0, 0, 0, 1, 2, -1, 0, 1, 0, 1, -1, -1, -2, -1, -1, 0, 0, 1, 1, -1, 2, 1, 1, -1, 0, -1, -1, 0, 2, 1, 1, -1, 0, 0, -1, -1, -2, 1, -1, 1, 0, -1, 0, 1, 2, 1, -1, 1, 0, -1, 0, 0, 0, -1, 1, -1, 0, -1
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 07 2003

Keywords

Comments

Mobius transform of 1,2,0,0,0,0,... (A130779). - R. J. Mathar, Mar 24 2012

Examples

			a(4) = -2 because the primitive fourth roots of unity are i and -i.  We sum their squares to get i^2 + (-i)^2 = -1 + -1 = -2. - _Geoffrey Critzer_, Dec 30 2015
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • E. C. Titchmarsh and D. R. Heath-Brown, The theory of the Riemann zeta-function, 2nd edn., 1986.

Crossrefs

Cf. A085097, A085384, A085639, A085906 for Ramanujan sums c_n(3), c_n(4), c_n(5), c_n(6).

Programs

  • Maple
    with(numtheory):a:=n->phi(n)*mobius(n/gcd(n,2))/phi(n/gcd(n,2)): seq(a(n),n=1..130); # Emeric Deutsch, Dec 23 2004
  • Mathematica
    f[list_, i_] := list[[i]]; nn = 105; a = Table[MoebiusMu[n], {n, 1, nn}]; b =Table[If[IntegerQ[2/n], n, 0], {n, 1,nn}];Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Dec 30 2015 *)
    f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := Switch[e, 1, 1, 2, -2, , 0]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 21 2024 *)
  • PARI
    A086831(n) = (eulerphi(n)*moebius(n/gcd(n, 2))/eulerphi(n/gcd(n, 2))); \\ Antti Karttunen, Sep 27 2018

Formula

For a general k >= 1, c_n(k) = phi(n)*mu(n/gcd(n, k)) / phi(n/gcd(n, k)); so c_n(1) = mu(n) = A008683(n).
a(n) = phi(n)*mu(n/gcd(n, 2)) / phi(n/gcd(n, 2)).
Dirichlet g.f.: (1+2^(1-s))/zeta(s). [Titchmarsh eq. (1.5.4)] - R. J. Mathar, Mar 26 2011
Multiplicative with a(2) = 1, a(2^2) = -2, and a(2^e) = 0 for e >= 3, and for an odd prime p, a(p) = -1 and a(p^e) = 0 for e >= 2. - Amiram Eldar, Sep 14 2023
Sum_{k=1..n} abs(a(k)) ~ (8/Pi^2) * n. - Amiram Eldar, Jan 21 2024

Extensions

Corrected and extended by Emeric Deutsch, Dec 23 2004

A085384 Ramanujan sum c_n(4).

Original entry on oeis.org

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

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 12 2003

Keywords

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • E. C. Titchmarsh and D. R. Heath-Brown, The Theory of the Riemann Zeta-function, 2nd ed., 1986.
  • 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
    a[n_] := EulerPhi[n] * MoebiusMu[n/GCD[n, 4]] / EulerPhi[n/GCD[n, 4]]; Table[ a[n], {n, 1, 105}]
    f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := Switch[e, 1, 1, 2, 2, 3, -4, , 0]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 21 2024 *)
  • PARI
    a(n)=eulerphi(n)*moebius(n/gcd(n,4))/eulerphi(n/gcd(n,4))

Formula

a(n) = phi(n)*mu(n/gcd(n, 4)) / phi(n/gcd(n, 4)).
Dirichlet g.f.: (1+2^(1-s)+4^(1-s))/zeta(s). [Titchmarsh] - R. J. Mathar, Mar 26 2011
Lambert series and a consequence: Sum_{n >= 1} c_n(4) * z^n / (1 - z^n) = Sum_{s|4} s * z^s and -Sum_{n >= 1} (c_n(4) / n) * log(1 - z^n) = Sum_{s|4} z^s for |z| < 1 (using the principal value of the logarithm). - Petros Hadjicostas, Aug 24 2019
From Amiram Eldar, Jan 21 2024: (Start)
Multiplicative with a(2) = 1, a(2^2) = 2, a(2^3) = -4, and a(2^e) = 0 for e >= 4, and for an odd prime p, a(p) = -1, and a(p^e) = 0 for e >= 2.
Sum_{k=1..n} abs(a(k)) ~ (10/Pi^2) * n. (End)

Extensions

More terms from Robert G. Wilson v and Benoit Cloitre, Aug 17 2003

A085639 Ramanujan sum c_n(5).

Original entry on oeis.org

1, -1, -1, 0, 4, 1, -1, 0, 0, -4, -1, 0, -1, 1, -4, 0, -1, 0, -1, 0, 1, 1, -1, 0, -5, 1, 0, 0, -1, 4, -1, 0, 1, 1, -4, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 5, 1, 0, -1, 0, -4, 0, 1, 1, -1, 0, -1, 1, 0, 0, -4, -1, -1, 0, 1, 4, -1, 0, -1, 1, 5, 0, 1, -1, -1, 0, 0, 1, -1, 0, -4, 1, 1, 0, -1
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 15 2003

Keywords

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[n] * MoebiusMu[n/GCD[n, 5]] / EulerPhi[n/GCD[n, 5]]; Table[ a[n], {n, 1, 105}]
    f[p_, e_] := If[e == 1, -1, 0]; f[5, e_] := Switch[e, 1, 4, 2, -5, , 0]; a[1] = 1; a[n] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 21 2024 *)
  • PARI
    a(n)=eulerphi(n)*moebius(n/gcd(n,5))/eulerphi(n/gcd(n,5))

Formula

a(n) = phi(n)*mu(n/gcd(n, 5)) / phi(n/gcd(n, 5)).
Dirichlet g.f.: (1+5^(1-s))/zeta(s). - R. J. Mathar, Mar 26 2011
Lambert series and a consequence: Sum_{n >= 1} c_n(5) * z^n / (1 - z^n) = z + 5*z^5 and -Sum_{n >= 1} (c_n(5) / n) * log(1 - z^n) = z + z^5 for |z| < 1 (using the principal value of the logarithm). - Petros Hadjicostas, Aug 24 2019
From Amiram Eldar, Jan 21 2024: (Start)
Multiplicative with a(5) = 4, a(5^2) = -5, and a(5^e) = 0 for e >= 3, and for a prime p != 5, a(p) = -1, and a(p^e) = 0 for e >= 2.
Sum_{k=1..n} abs(a(k)) ~ (10/Pi^2) * n. (End)

Extensions

More terms from Robert G. Wilson v and Benoit Cloitre, Aug 17 2003
Showing 1-6 of 6 results.