A191898 Symmetric square array read by antidiagonals: T(n,1)=1, T(1,k)=1, T(n,k) = -Sum_{i=1..k-1} T(n-i,k) for n >= k, -Sum_{i=1..n-1} T(k-i,n) for n < k.
1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -2, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -2, 1, 1, -2, 1, 1, 1, -1, 1, -1, -4, -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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -6, -1, 1, -1, 1, -1, 1
Offset: 1
Examples
Array starts: n\k | 1 2 3 4 5 6 7 8 9 10 ----+----------------------------------------------------- 1 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 2 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ... 3 | 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, ... 4 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ... 5 | 1, 1, 1, 1, -4, 1, 1, 1, 1, -4, ... 6 | 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, ... 7 | 1, 1, 1, 1, 1, 1, -6, 1, 1, 1, ... 8 | 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ... 9 | 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, ... 10 | 1, -1, 1, -1, -4, -1, 1, -1, 1, 4, ...
Links
- Antti Karttunen, Table of n, a(n) for n = 1..22155; the first 210 antidiagonals of the array
- Mats Granvik, Is this similarity to the Fourier transform of the von Mangoldt function real?
- Mats Granvik, Is this Riemann zeta function product equal to the Fourier transform of the von Mangoldt function?
- Mats Granvik, Primes approximated by eigenvalues?
- Mats Granvik, Are the primes found as a subset in this sequence a(n)?
- Mats Granvik, Will every eigenvalue in this type of matrix eventually be a common eigenvalue to infinitely many subsequent larger matrices of the same form?
- Mats Granvik, How write Dirichlet character sums for the terms of the von Mangoldt function?
- Mats Granvik, Do these series converge to the von Mangoldt function?
- Mats Granvik, Is this sum equal to the Möbius function?
- Mats Granvik, Can the Riemann hypothesis be relaxed to say that this matrix A consists of square roots?
- Mats Granvik, Elementary proof of the prime number theorem?
- Mats Granvik, Is this Dirichlet series generating function of the von Mangoldt function matrix correct?
- Mats Granvik, Question about ratios of polynomials evaluated at x=1
Crossrefs
Programs
-
Mathematica
T[ n_, k_] := T[ n, k] = Which[ n < 1 || k < 1, 0, n == 1 || k == 1, 1, k > n, T[k, n], n > k,T[k, Mod[n, k, 1]], True, -Sum[ T[n, i], {i, n - 1}]]; (* Michael Somos, Jul 18 2011 *) (* Conjectured expression for the matrix as Dirichlet characters *) s = RandomInteger[{1, 3}]; c = RandomInteger[{1, 3}]; nn = 12; b = Table[Exp[MangoldtLambda[Divisors[n]]]^-MoebiusMu[Divisors[n]], {n, 1, nn^Max[s, c]}]; j = 1; MatrixForm[Table[Table[Product[(b[[n^s]][[m]]*DirichletCharacter[b[[n^s]][[m]], j, k^c] - (b[[n^s]][[m]] - 1)), {m, 1, Length[Divisors[n]]}], {n, 1, nn}], {k, 1, nn}]] (* Mats Granvik, Nov 23 2013 and Aug 09 2016 *)
-
PARI
{T(n, k) = if( n<1 || k<1, 0, n==1 || k==1, 1, k>n, T(k, n), k
Michael Somos, Jul 18 2011 */ -
Python
from sympy.core.cache import cacheit @cacheit def T(n, k): return 0 if n<1 or k<1 else 1 if n==1 or k==1 else T(k, n) if k>n else T(k, (n - 1)%k + 1) if n>k else -sum([T(n, i) for i in range(1, n)]) for n in range(1, 21): print([T(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Oct 23 2017
Formula
T(n,1)=1, T(1,k)=1, n>=k: -Sum_{i=1..k-1} T(n-i,k), n
T(n, n) = A023900(n). - Michael Somos, Jul 18 2011
T(n, k) = A023900(gcd(n,k)). - Mats Granvik, Jun 18 2012
Dirichlet generating function for sequence in the n-th row: zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1). - Mats Granvik, Jun 18 2012 & Jun 19 2016
From Mats Granvik, Jun 19 2016: (Start)
Dirichlet generating function for the whole matrix: Sum_{k>=1} (Sum_{n>=1} T(n,k)/(n^c*k^s)) = Sum_{n>=1} (zeta(s)*Sum_{ d divides n } mu(d)/d^(s-1))/n^c = zeta(s)*zeta(c)/zeta( c + s - 1 ).
T(n,k) = A127093(n,k)^(1/2-i*a(k))*transpose(A008683(k)*(A127093(n,k)^(1/2+i*a(n)))) where a(x) is some real number. An example would be T(n,k) = A127093(n,k)^(zetazero(k))*transpose(A008683(k)*(A127093(n,k)^(zetazero(-k)))) but this is of course not special for only the zeta zeros.
Recurrence for a subset of A191898 that is a cross-directional variant of the recurrence in A051731: T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..k-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..n-1} T(k-i,n) - T(k-i,n-1). Notice that the identity matrix in linear algebra satisfies a similar recurrence:
T(1,1)=1, T(1,2..k)=0, T(2..n,1)=0, n >= k: -Sum_{i=1..n-1} T(n-i,k) - T(n-i,k-1), n < k: -Sum_{i=1..k-1} T(k-i,n) - T(k-i,n-1).
(End)
Dirichlet generating function for absolute values: Sum_{k>=1} (Sum_{n>=1} abs(T(n,k))/(n^c*k^s)) = zeta(s)*zeta(c)*zeta(s + c - 1)/zeta(2*(s + c - 1))*Product_{k>=1} (1 - 2/(prime(k) + prime(k)^(s + c))). After Vaclav Kotesovec in A173557. - Mats Granvik, Apr 25 2021
A047996 Triangle read by rows: T(n,k) is the (n,k)-th circular binomial coefficient, where 0 <= k <= n.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 3, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 1, 4, 7, 10, 7, 4, 1, 1, 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, 1, 1, 6, 22
Offset: 0
Comments
Equivalently, T(n,k) = number of necklaces with k black beads and n-k white beads (binary necklaces of weight k).
The same sequence arises if we take the table U(n,k) = number of necklaces with n black beads and k white beads and read it by antidiagonals (cf. A241926). - Franklin T. Adams-Watters, May 02 2014
U(n,k) is also equal to the number of ways to express 0 as a sum of k elements in Z/nZ. - Jens Voß, Franklin T. Adams-Watters, N. J. A. Sloane, Apr 30 2014 - May 05 2014. See link ("A Note on Modular Partitions and Necklaces") for proof.
The generating function for column k is given by the substitution x_j -> x^j/(1-x^j) in the cycle index of the Symmetric Group of order k. - R. J. Mathar, Nov 15 2018
From Petros Hadjicostas, Jul 12 2019: (Start)
Regarding the comments above by Voss, Adams-Watters, and Sloane, note that 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)} A054535(d, v) * binomial((n + k)/d, k/d) = S(k, n, v).
This result 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, 0) = A241926(n, k) = U(n, k) = T(n + k, k) (where T(n, k) is the current array). Also, S(n, k, 1) = A245558(n, k). See also Panyushev (2011) for more general results and for generating functions.
Finally, note that A054535(d, v) = c_d(v) = Sum_{s | gcd(d,v)} s*Moebius(d/s). These are the Ramanujan sums, which equal also the von Sterneck function c_d(v) = phi(d) * Moebius(d/gcd(d, v))/phi(d/gcd(d, v)). We have A054535(d, v) = A054534(v, d).
It would be interesting to see whether there is a proof of the results by Fredman (1975), Elashvili et al. (1999), and Panyushev (2011) for a general v using Molien series as it is done by Sloane (2014) for the case v = 0 (in which case, A054535(d, 0) = phi(d)). (Even though the columns of array A054535(d, v) start at v = 1, we may start the array at column v = 0 as well.)
(End)
U(n, k) is the number of equivalence classes of k-tuples of residues modulo n, identifying those that differ componentwise by a constant and those that differ by a permutation. - Álvar Ibeas, Sep 21 2021
Examples
Triangle starts: [ 0] 1, [ 1] 1, 1, [ 2] 1, 1, 1, [ 3] 1, 1, 1, 1, [ 4] 1, 1, 2, 1, 1, [ 5] 1, 1, 2, 2, 1, 1, [ 6] 1, 1, 3, 4, 3, 1, 1, [ 7] 1, 1, 3, 5, 5, 3, 1, 1, [ 8] 1, 1, 4, 7, 10, 7, 4, 1, 1, [ 9] 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, [10] 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, [11] 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, [12] 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, ...
References
- N. G. de Bruijn, Polya's theory of counting, in: Applied Combinatorial Mathematics (E. F. Beckenbach, ed.), John Wiley and Sons, New York, 1964, pp. 144-184 (implies g.f. for this triangle).
- Richard Stanley, Enumerative Combinatorics, 2nd. ed., Vol 1, Chapter I, Problem 105, pp. 122 and 168, discusses the number of subsets of Z/nZ that add to 0. - N. J. A. Sloane, May 06 2014
- J. Voß, Posting to Sequence Fans Mailing List, April 30, 2014.
- H. S. Wilf, personal communication to N. J. A. Sloane, Nov., 1990.
- See A000031 for many additional references and links.
Links
- Seiichi Manyama, Rows n=0..139 of triangle, flattened (Rows 0..50 from T. D. Noe)
- Ethan Akin and Morton Davis, Bulgarian solitaire, Am. Math. Monthly 92 (4) (1985), 237-250.
- J. Brandt, Cycles of partitions, Proc. Am. Math. Soc. 85 (3) (1982), 483-486, Theorem 5.
- Paul Drube and Puttipong Pongtanapaisan, Annular Non-Crossing Matchings, Journal of Integer Sequences, Vol. 19 (2016), #16.2.4.
- A. Elashvili and M. Jibladze, Hermite reciprocity for the regular representations of cyclic groups, Indag. Math. (N.S.) 9 (1998), no. 2, 233-238. MR1691428 (2000c:13006)
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), no. 2, 173--188. MR1719140 (2000j:05009). See p. 174. - _N. J. A. Sloane_, Aug 06 2014
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Harold Fredricksen, An algorithm for generating necklaces of beads in two colors, Discrete Mathematics, Volume 61, Issues 2-3, September 1986, 181-188.
- D. E. Knuth, Computer science and its relation to mathematics, Amer. Math. Monthly, 81 (1974), 323-343.
- D. E. Knuth, H. Wilf, C. L. Mallows, and D. Klarner, Correspondence, 1994
- Petr Lisonek, Computer-assisted Studies in Algebraic Combinatorics, Thesis, University of Linz (Austria) Sep. 1994, pp. 72-73.
- D. I. Panyushev, Fredman's reciprocity, invariants of abelian groups, and the permanent of the Cayley table, J. Algebraic Combin. 33 (2011), 111-125.
- Mónica A. Reyes, Cristina Dalfó, Miguel Àngel Fiol, and Arnau Messegué, A general method to find the spectrum and eigenspaces of the k-token of a cycle, and 2-token through continuous fractions, arXiv:2403.20148 [math.CO], 2024. See p. 5.
- Frank Ruskey, Generate Necklaces, Lyndon words, and relatives, The Combinatorial Object Server.
- Frank Ruskey and Joe Sawada, An Efficient Algorithm for Generating Necklaces with Fixed Density, SIAM J. Computing, 29 (1999) 671-684.
- Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc. [Cached copy, with permission, pdf format only]
- N. J. A. Sloane, A Note on Modular Partitions and Necklaces, 2014.
- Pantelimon Stănică and Subhamoy Maitra, Rotation symmetric boolean functions - count and cryptographic properties, Disc. Appl. Math. 156 (2008) 1567-1580, g_{n,w} Theorem 9.
- Wikipedia, Necklaces Animation [Broken link?]
- Wolfram Research, Necklaces Applet.
- Index entries for sequences related to necklaces
Crossrefs
Programs
-
Maple
A047996 := proc(n,k) local C,d; if k= 0 then return 1; end if; C := 0 ; for d in numtheory[divisors](igcd(n,k)) do C := C+numtheory[phi](d)*binomial(n/d,k/d) ; end do: C/n ; end proc: seq(seq(A047996(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Apr 14 2011
-
Mathematica
t[n_, k_] := Total[EulerPhi[#]*Binomial[n/#, k/#] & /@ Divisors[GCD[n, k]]]/n; t[0, 0] = 1; Flatten[Table[t[n, k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jul 19 2011, after given formula *)
-
PARI
p(n) = if(n<=0, n==0, 1/n * sum(i=0,n-1, (x^(n/gcd(i,n))+1)^gcd(i,n) )); for (n=0,17, print(Vec(p(n)))); /* print triangle */ /* Joerg Arndt, Sep 28 2012 */
-
PARI
T(n,k) = if(n<=0, n==0, 1/n * sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d,k/d) ) ); /* print triangle: */ { for (n=0, 17, for (k=0, n, print1(T(n,k),", "); ); print(); ); } /* Joerg Arndt, Oct 21 2012 */
Formula
T(n, k) = (1/n) * Sum_{d | (n, k)} phi(d)*binomial(n/d, k/d).
G.f. for row n (n>=1): (1/n) * Sum_{i=0..n-1} ( x^(n/gcd(i,n)) + 1 )^gcd(i,n). - Joerg Arndt, Sep 28 2012
G.f.: Sum_{n, k >= 0} T(n, k)*x^n*y^k = 1 - Sum_{s>=1} (phi(s)/s)*log(1-x^s*(1+y^s)). - Petros Hadjicostas, Oct 26 2017
Product_{d >= 1} (1 - x^d - y^d) = Product_{i,j >= 0} (1 - x^i*y^j)^T(i+j, j), where not both i and j are zero. (It follows from Somos' infinite product for array A051168.) - Petros Hadjicostas, Jul 12 2019
Extensions
Name edited by Petros Hadjicostas, Nov 16 2017
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.
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
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.
Links
- Seiichi Manyama, Rows n=1..140 of triangle, flattened (Rows 1..50 from T. D. Noe)
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Emiliano Gagliardo, Le funzioni simmetriche semplici delle radici n-esime primitive dell'unità, Bollettino dell'Unione Matematica Italiana Serie 3, 8(3) (1953), 269-273.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- Peter H. van der Kamp, On the Fourier transform of the greatest common divisor, Integers 13 (2013), #A24. [See Section 3 for historical remarks.]
- J. C. Kluyver, Some formulae concerning the integers less than n and prime to n, in: KNAW, Proceedings, 9 I, 1906, Amsterdam, 1906, pp. 408-414. [See bottom of p. 410, where the author proves that Sum cos(2*Pi*q*v/n) = mu(n/D) * phi(n) /phi(n/D), where D is the gcd of n and q. The summation is over integers v "less than n and prime to n" (top of p. 408).]
- C. A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- C. A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Akad. Wiss. Sapientiae Math.-Naturwiss. Kl. 111 (1902), 1567-1601 (Abt. IIa).
- R. D. von Sterneck, Über ein Analogon zur additiven Zahlentheorie, Jahresbericht der Deutschen Mathematiker-Vereinigung 12 (1903), 110-113.
- M. V. Subbarao, The Brauer-Rademacher identity, Amer. Math. Monthly 72 (1965), 135-138.
- Wikipedia, Ramanujan's sum.
- Wikipedia, Robert Daublebsky von Sterneck der Jüngere.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
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
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).
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
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).
Links
- Seiichi Manyama, Antidiagonals n = 1..140, flattened
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Austrian Biographical Encyclopedia from 1815 onwards, Daublebsky von Sterneck, Robert.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Emiliano Gagliardo, Le funzioni simmetriche semplici delle radici n-esime primitive dell'unità, Bollettino dell'Unione Matematica Italiana Serie 3, 8(3) (1953), 269-273.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- Peter H. van der Kamp, On the Fourier transform of the greatest common divisor, Integers 13 (2013), #A24. [See Section 3 for historical remarks.]
- C. A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- C. A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- M. V. Subbarao, The Brauer-Rademacher identity, Amer. Math. Monthly 72 (1965), 135-138.
- Wikipedia, Ramanujan's sum.
- Wikipedia, Robert Daublebsky von Sterneck der Jüngere.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
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
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.
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
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.
Links
- T. D. Noe, Rows n=1..50 of triangle, flattened
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- H. G. Gadiyar and R. Padma, Linking the circle and the sieve: Ramanujan-Fourier series, arXiv:math/0601574 [math.NT], 2006.
- Emiliano Gagliardo, Le funzioni simmetriche semplici delle radici n-esime primitive dell'unità, Bollettino dell'Unione Matematica Italiana Serie 3, 8(3) (1953), 269-273.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- Peter H. van der Kamp, On the Fourier transform of the greatest common divisor, Integers 13 (2013), #A24. [See Section 3 for historical remarks.]
- J. C. Kluyver, Some formulae concerning the integers less than n and prime to n, in: KNAW, Proceedings, 9 I, 1906, Amsterdam, 1906, pp. 408-414; see p. 410.
- P. Moree and H. Hommerson, Value distribution of Ramanujan sums and of cyclotomic polynomial coefficients, arXiv:math/0307352 [math.NT], 2003.
- K. Motose, Ramanujan's sums and cyclotomic polynomials, Math. J. Okayama U. 47, no 1, (2005), Article 5.
- C. A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- C. A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Akad. Wiss. Sapientiae Math.-Naturwiss. Kl. 111 (1902), 1567-1601 (Abt. IIa). [It may not be universally accessible.]
- R. D. von Sterneck, Über ein Analogon zur additiven Zahlentheorie, Jahresbericht der Deutschen Mathematiker-Vereinigung 12 (1903), 110-113. [Summary of the 1902 paper.]
- Wikipedia, Ramanujan's sum.
- Wikipedia, Robert Daublebsky von Sterneck der Jüngere.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
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
A086831 Ramanujan sum c_n(2).
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
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- Michael L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- Charles A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- Charles A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- Wikipedia, Ramanujan's sum.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
Crossrefs
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).
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
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).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- J. C. Kluyver, Some formulae concerning the integers less than n and prime to n, in: KNAW, Proceedings, 9 I, 1906, Amsterdam, 1906, pp. 408-414; see p. 410.
- C. A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- C. A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- Wikipedia, Ramanujan's sum.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
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).
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
References
- Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Tom M. Apostol, Arithmetical properties of generalized Ramanujan sums, Pacific J. Math. 41 (1972), 281-293.
- Eckford Cohen, A class of arithmetic functions, Proc. Natl. Acad. Sci. USA 41 (1955), 939-944.
- A. Elashvili, M. Jibladze, and D. Pataraia, Combinatorics of necklaces and "Hermite reciprocity", J. Algebraic Combin. 10 (1999), 173-188.
- M. L. Fredman, A symmetry relationship for a class of partitions, J. Combinatorial Theory Ser. A 18 (1975), 199-202.
- Emiliano Gagliardo, Le funzioni simmetriche semplici delle radici n-esime primitive dell'unità, Bollettino dell'Unione Matematica Italiana Serie 3, 8(3) (1953), 269-273.
- Otto Hölder, Zur Theorie der Kreisteilungsgleichung K_m(x)=0, Prace mat.-fiz. 43 (1936), 13-23.
- J. C. Kluyver, Some formulae concerning the integers less than n and prime to n, in: KNAW, Proceedings, 9 I, 1906, Amsterdam, 1906, pp. 408-414; see p. 410.
- C. A. Nicol, On restricted partitions and a generalization of the Euler phi number and the Moebius function, Proc. Natl. Acad. Sci. USA 39(9) (1953), 963-968.
- C. A. Nicol and H. S. Vandiver, A von Sterneck arithmetical function and restricted partitions with respect to a modulus, Proc. Natl. Acad. Sci. USA 40(9) (1954), 825-835.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69.
- Srinivasa Ramanujan, On certain trigonometric sums and their applications in the theory of numbers, Trans. Camb. Phil. Soc. 22 (1918), 259-276.
- M. V. Subbarao, The Brauer-Rademacher identity, Amer. Math. Monthly 72 (1965), 135-138.
- Peter H. van der Kamp, On the Fourier transform of the greatest common divisor, Integers 13 (2013), #A24. [See Section 3 for historical remarks.]
- Wikipedia, Ramanujan's sum.
- Aurel Wintner, On a statistics of the Ramanujan sums, Amer. J. Math., 64(1) (1942), 106-114.
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
A282634 Recursive 2-parameter sequence allowing the Ramanujan's sum calculation.
1, 1, -1, 2, -1, -1, 2, 0, -2, 0, 4, -1, -1, -1, -1, 2, 1, -1, -2, -1, 1, 6, -1, -1, -1, -1, -1, -1, 4, 0, 0, 0, -4, 0, 0, 0, 6, 0, 0, -3, 0, 0, -3, 0, 0, 4, 1, -1, 1, -1, -4, -1, 1, -1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 0, 2, 0, -2, 0, -4, 0
Offset: 1
Comments
Examples
The few first rows follow: c_n(t) t 0 1 2 3 4 5 6 | t 1 2 3 4 5 6 7 n |n 1 1; |1 1; 2 1, -1; |2 -1, 1; 3 2, -1, -1; |3 -1, -1, 2; 4 2, 0, -2, 0; |4 0, -2, 0, 2; 5 4, -1, -1, -1, -1; |5 -1, -1, -1, -1, 4; 6 2, 1, -1, -2, -1, 1; |6 1, -1, -2, -1, 1, 2; 7 6, -1, -1, -1, -1, -1, -1; |7 -1, -1, -1, -1, -1, -1, 6; ... | ... [Edited by _Seiichi Manyama_, Mar 05 2018]
Links
- Seiichi Manyama, Rows n=1..140 of triangle, flattened
- Gevorg Hmayakyan, On The Moebius and Euler Totient Functions Calculation.
- Charles A. Nicol, On Restricted Partitions and a Generalization Of The Euler Totient and The Moebius Function, PNAS 39(9) (1953), 963-968.
Programs
-
Mathematica
b[n_, m_] := b[n, m] = If[n > 1, b[n - 1, m] - b[n - 1, m - n + 1], 0] b[1, m_] := b[1, m] = If[m == 0, 1, 0] nt[n_, t_] := Round[(n - 1)/2 - t/n] a[n_, t_] := Sum[b[n, k*n + t], {k, 0, nt[n, t]}] Flatten[Table[Table[a[n, m], {m, 0, n - 1}], {n, 1, 20}]]
Formula
a(n,t) = Sum(b(n, k*n + t), k=0..N(n, t)), where b(n,k) = A231599(n-1,k) and N(n,t) = [(n - 1)/2 - t/n].
a(n,t) = c_n(t) for t >= 1, where c_n(t) is a Ramanujan's sum A054533.
a(n,t) = a(n,-t)
From Seiichi Manyama, Mar 05 2018: (Start)
a(n,t) = c_n(n-t) = Sum_{d | gcd(n,n-t)} d*mu(n/d) for 0 <= t <= n-1.
So a(n,t) = Sum_{d | gcd(n,t)} d*mu(n/d) for 1 <= t <= n-1. (End)
A267632 Triangle T(n, k) read by rows: the k-th column of the n-th row lists the number of ways to select k distinct numbers (k >= 1) from [1..n] so that their sum is divisible by n.
1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 2, 4, 3, 1, 0, 1, 3, 5, 5, 3, 1, 1, 1, 3, 7, 9, 7, 3, 1, 0, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 4, 12, 22, 26, 20, 12, 5, 1, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 5, 19, 42, 66, 76, 66, 43, 19, 5, 1, 0
Offset: 1
Comments
Row less the last element is palindrome for n=odd or n=power of 2 where n is the row number (observation-conjecture).
From Petros Hadjicostas, Jul 13 2019: (Start)
By reading carefully the proof of Lemma 5.1 (pp. 65-66) in Barnes (1959), we see that he actually proved a general result (even though he does not state it in the lemma).
According to the definition of this sequence, for 1 <= k <= n, T(n, k) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = 0 (mod n). The proof of Lemma 5.1 in Barnes (1959) implies that T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
For fixed k >= 1, the g.f. of the column (T(n, k): n >= 1) (with T(n, k) = 0 for 1 <= n < k) is (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s), which generalizes Herbert Kociemba's formula from A032801.
Barnes' (1959) formula is a special case of Theorem 4 (p. 66) in Ramanathan (1944). If R(n, k, v) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = v (mod n), then he proved that R(n, k, v) = (1/n) * Sum_{s | gcd(n,k)} (-1)^(k - (k/s)) * binomial(n/s, k/s) * C_s(v), where C_s(v) = A054535(s, v) = Sum_{d | gcd(s,v)} d * Moebius(s/d) is Ramanujan's sum (even though it was first discovered around 1900 by the Austrian mathematician R. D. von Sterneck).
Because C_s(v = 0) = phi(s), we get Barnes' (implicit) result; i.e., R(n, k, v=0) = T(n, k) for 1 <= k <= n.
For k=2, we have R(n, k=2, v=0) = T(n, k=2) = A004526(n-1) for n >= 1. For k=3, we have R(n, k=3, v=0) = T(n, k=3) = A058212(n) for n >= 1. For k=4, we have R(n, k=4, v=0) = A032801(n) for n >= 1. For k=5, we have R(n, k=5, v=0) = T(n, k=5) = A008646(n-5) for n >= 5.
The reason we have T(2*m+1, k) = A037306(2*m+1, k) = A047996(2*m+1, k) for m >= 0 and k >= 1 is the following. When n = 2*m + 1, all divisors s of gcd(n, k) are odd. In such a case, k - (k/s) is even for all k >= 1, and thus (-1)^(k - (k/s)) = 1, and thus T(n = 2*m+1, k) = (1/n) * Sum_{s | gcd(n, k)} phi(s) * binomial(n/s, k/s) = A037306(2*m+1, k) = A047996(2*m+1, k).
By summing the products of the g.f. of column k times y^k from k = 1 to k = infinity, we get the bivariate g.f. for the array: Sum_{n, k >= 1} T(n, k)*x^n*y^k = Sum_{s >= 1} (phi(s)/s) * log((1 - x^s + (-x*y)^s)/(1 - x^s)) = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
Letting y = 1 in the above bivariate g.f., we get the g.f. of the sequence (Sum_{1 <= k <= n} T(n, k): n >= 1) is -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x)^s) = -x/(1 - x) + Sum_{m >= 0} (phi(2*m + 1)/(2*m + 1)) * log(1 - 2*x^(2*m+1)), which is the g.f. of sequence A082550. Hence, sequence A082550 consists of the row sums.
There is another important interpretation of this array T(n, k) which is related to some of the references for sequence A047996, but because the discussion is too lengthy, we omit the details.
(End)
Examples
For n = 5, there is one way to pick one number (5), two ways to pick two numbers (1+4, 2+3), two ways to pick 3 numbers (1+4+5, 2+3+5), one way to pick 4 numbers (1+2+3+4), and one way to pick 5 numbers (1+2+3+4+5) so that their sum is divisible by 5. Therefore, T(5,1) = 1, T(5,2) = 2, T(5,3) = 2, T(5,4) = 1, and T(5,5) = 1. Table for T(n,k) begins as follows: n\k 1 2 3 4 5 6 7 8 9 10 1 1 2 1 0 3 1 1 1 4 1 1 1 0 5 1 2 2 1 1 6 1 2 4 3 1 0 7 1 3 5 5 3 1 1 8 1 3 7 9 7 3 1 0 9 1 4 10 14 14 10 4 1 1 10 1 4 12 22 26 20 12 5 1 0 ...
Links
- Alois P. Heinz, Rows n = 1..150, flattened
- Eric Stephen Barnes, The construction of perfect and extreme forms I, Acta Arith., 5 (1959); see pp. 65-66.
- Michiel Kosters, The subset sum problem for finite abelian groups, J. Combin. Theory Ser. A 120 (2013), 527-530.
- Jiyou Li and Daqing Wan, Counting subset sums of finite abelian groups, J. Combin. Theory Ser. A 119 (2012), 170-182; see pp. 171-172.
- K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 62-69; see p. 66.
- R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Akad. Wiss. Sapientiae Math.-Naturwiss. Kl. 111 (1902), 1567-1601 (Abt. IIa).
- R. D. von Sterneck, Über ein Analogon zur additiven Zahlentheorie, Jahresbericht der Deutschen Mathematiker-Vereinigung 12 (1903), 110-113.
Crossrefs
Programs
-
Maple
A267632 := proc(n,k) local a,msel,p; a := 0 ; for msel in combinat[choose](n,k) do if modp(add(p,p=msel),n) = 0 then a := a+1 ; end if; end do: a; end proc: # R. J. Mathar, May 15 2016 # second Maple program: b:= proc(n, m, s) option remember; expand(`if`(n=0, `if`(s=0, 1, 0), b(n-1, m, s)+x*b(n-1, m, irem(s+n, m)))) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2, 0)): seq(T(n), n=1..14); # Alois P. Heinz, Aug 27 2018
-
Mathematica
f[k_, n_] := Length[Select[Select[Subsets[Range[n]], Length[#] == k &], IntegerQ[Total[#]/n] &]];MatrixForm[Table[{n, Table[f[k, n], {k, n}]}, {n, 10}]] (* Dimitri Papadopoulos, Jan 18 2016 *)
Formula
From Petros Hadjicostas, Jul 13 2019: (Start)
T(n, k) = (1/n) * Sum_{s | gcd(n, k)} (-1)^(k - (k/s)) * phi(s) * binomial(n/s, k/s) for 1 <= k <= n.
G.f. for column k >= 1: (x^k/k) * Sum_{s|k} phi(s) * (-1)^(k - (k/s)) / (1 - x^s)^(k/s).
Bivariate g.f.: Sum_{n, k >= 1} T(n, k)*x^n*y^k = -x/(1 - x) - Sum_{s >= 1} (phi(s)/s) * log(1 - x^s + (-x*y)^s).
(End)
Sum_{k=1..n} k * T(n,k) = A309122(n). - Alois P. Heinz, Jul 13 2019
Comments