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-10 of 80 results. Next

A063534 Numbers k such that C(k) = H(k) + d(k), where C(k) is Chowla's function A048050, H(k) is the half-totient function A023022 and d(k) is the number of divisors function A000005.

Original entry on oeis.org

6, 8, 15, 21, 33, 39, 51, 57, 69, 87, 93, 111, 123, 129, 141, 159, 177, 183, 201, 213, 219, 237, 249, 267, 291, 303, 309, 321, 327, 339, 381, 393, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597, 633, 669, 681, 687, 699, 717, 723, 753
Offset: 1

Views

Author

Jason Earls, Aug 02 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], DivisorSigma[1, #] - 1 - # == EulerPhi[#]/2 + DivisorSigma[0, #] &] (* Paolo Xausa, Apr 17 2024 *)
  • PARI
    C(n)=sigma(n)-n-1;
    H(n)=eulerphi(n)/2;
    j=[]; for(n=1,1200, if(C(n)==H(n)+numdiv(n),j=concat(j,n))); j
    
  • PARI
    { n=0; for (m=1, 10^9, if (sigma(m) - m - 1 == eulerphi(m)/2 + numdiv(m), write("b063534.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 25 2009
    
  • PARI
    is(n) = {my(f = factor(n)); sigma(f) - n - 1 == eulerphi(f) / 2 + numdiv(f);} \\ Amiram Eldar, Apr 15 2024

Formula

Conjecture: a(n) = A001748(n), n <> 2. - R. J. Mathar, Dec 15 2008
The conjecture is false. The least counterexample is a(11546) = 368335 = 5 * 11 * 37 * 181. The next counterexample is 4922335, and there are no more below 10^10. - Amiram Eldar, Apr 15 2024

A062948 a(n) = H(A002808(n)) where H(n) is the half-totient function, H(n) = phi(n)/2: (A023022) and A002808(n) are the composites.

Original entry on oeis.org

1, 1, 2, 3, 2, 2, 3, 4, 4, 3, 4, 6, 5, 4, 10, 6, 9, 6, 4, 8, 10, 8, 12, 6, 9, 12, 8, 6, 10, 12, 11, 8, 21, 10, 16, 12, 9, 20, 12, 18, 14, 8, 15, 18, 16, 24, 10, 16, 22, 12, 12, 18, 20, 18, 30, 12, 16, 27, 20, 12, 32, 21, 28, 20, 12, 36, 22, 30, 23, 36, 16, 21, 30, 20, 16, 24, 24, 26
Offset: 1

Views

Author

Jason Earls, Jul 21 2001

Keywords

Crossrefs

Programs

  • PARI
    H(n)=eulerphi(n)/2;
    j=[]; for(n=2,200, if(isprime(n), n+1,j=concat(j,H(n) ))); j
    
  • PARI
    { n=0; for (m=2, 10^9, if (!isprime(m), write("b062948.txt", n++, " ", eulerphi(m)/2); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 14 2009

Extensions

Offset changed from 2 to 1 by Harry J. Smith, Aug 14 2009

A062950 C(H(n)), where C(n) is Chowla's function (A048050) and H(n) is the half-totient function (A023022).

Original entry on oeis.org

-1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 5, 0, 2, 2, 6, 0, 3, 2, 5, 0, 0, 2, 7, 5, 3, 5, 9, 2, 8, 6, 7, 6, 15, 5, 20, 3, 15, 6, 21, 5, 10, 7, 15, 0, 0, 6, 10, 7, 14, 15, 15, 3, 21, 15, 20, 9, 0, 6, 41, 8, 20, 14, 35, 7, 14, 14, 13, 15, 12, 15, 54, 20, 21, 20, 41, 15, 16, 14, 12, 21, 0, 15, 30, 10, 27, 21, 39, 15, 54, 13, 41, 0, 54, 14, 75, 10, 41, 21, 42, 14
Offset: 3

Views

Author

Jason Earls, Jul 21 2001

Keywords

Crossrefs

Programs

  • PARI
    C(n)=sigma(n)-n-1; H(n)=eulerphi(n)/2; j=[]; for(n=3,150,j=concat(j,C(H(n)))); j

A062956 a(n) = h(n^2) - h(n), where h(n) is the half-totient function (A023022).

Original entry on oeis.org

2, 3, 8, 5, 18, 14, 24, 18, 50, 22, 72, 39, 56, 60, 128, 51, 162, 76, 120, 105, 242, 92, 240, 150, 234, 162, 392, 116, 450, 248, 320, 264, 408, 210, 648, 333, 456, 312, 800, 246, 882, 430, 528, 495, 1058, 376, 1008, 490, 800, 612, 1352, 477, 1080, 660, 1008
Offset: 3

Views

Author

Jason Earls, Jul 22 2001

Keywords

Crossrefs

Programs

  • PARI
    h(n) = eulerphi(n)/2;
    a(n) = h(n^2)-h(n);

Formula

a(n) = (n-1)*A023022(n), n >= 3.

A062963 a(n) = mu(n) * H(n) where H(n) is A023022.

Original entry on oeis.org

-1, -1, 0, -2, 1, -3, 0, 0, 2, -5, 0, -6, 3, 4, 0, -8, 0, -9, 0, 6, 5, -11, 0, 0, 6, 0, 0, -14, -4, -15, 0, 10, 8, 12, 0, -18, 9, 12, 0, -20, -6, -21, 0, 0, 11, -23, 0, 0, 0, 16, 0, -26, 0, 20, 0, 18, 14, -29, 0, -30, 15, 0, 0, 24, -10, -33, 0, 22, -12, -35, 0, -36, 18, 0, 0, 30, -12, -39, 0, 0, 20, -41, 0, 32, 21, 28, 0, -44, 0, 36, 0, 30, 23, 36
Offset: 2

Views

Author

Jason Earls, Jul 22 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{-1}, Array[MoebiusMu[#] * EulerPhi[#]/2 &, 100, 3]] (* Paolo Xausa, Apr 17 2024 *)
  • PARI
    a(n) = if(n<=2, -1, eulerphi(n)/2*moebius(n)); \\ Michel Marcus, Apr 14 2024

Formula

a(n) = A008683(n) * A023022(n).

A063475 Sum_{d | H(n)} d^2, where H(n) is the Half-Totient function (A023022).

Original entry on oeis.org

1, 1, 5, 1, 10, 5, 10, 5, 26, 5, 50, 10, 21, 21, 85, 10, 91, 21, 50, 26, 122, 21, 130, 50, 91, 50, 250, 21, 260, 85, 130, 85, 210, 50, 455, 91, 210, 85, 546, 50, 500, 130, 210, 122, 530, 85, 500, 130, 341, 210, 850, 91, 546, 210, 455, 250, 842, 85, 1300, 260, 455, 341
Offset: 3

Views

Author

Jason Earls, Jul 27 2001

Keywords

Crossrefs

Cf. A023022.

Programs

  • PARI
    H(n)=eulerphi(n)/2; j=[]; for(n=3,150,j=concat(j,sumdiv(H(n),d,d^2))); j
    
  • PARI
    { for (n=3, 1000, write("b063475.txt", n, " ", sumdiv(eulerphi(n)/2, d, d^2)) ) } \\ Harry J. Smith, Aug 22 2009

A000010 Euler totient function phi(n): count numbers <= n and prime to n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 10, 22, 8, 20, 12, 18, 12, 28, 8, 30, 16, 20, 16, 24, 12, 36, 18, 24, 16, 40, 12, 42, 20, 24, 22, 46, 16, 42, 20, 32, 24, 52, 18, 40, 24, 36, 28, 58, 16, 60, 30, 36, 32, 48, 20, 66, 32, 44
Offset: 1

Views

Author

Keywords

Comments

Number of elements in a reduced residue system modulo n.
Degree of the n-th cyclotomic polynomial (cf. A013595). - Benoit Cloitre, Oct 12 2002
Number of distinct generators of a cyclic group of order n. Number of primitive n-th roots of unity. (A primitive n-th root x is such that x^k is not equal to 1 for k = 1, 2, ..., n - 1, but x^n = 1.) - Lekraj Beedassy, Mar 31 2005
Also number of complex Dirichlet characters modulo n; Sum_{k=1..n} a(k) is asymptotic to (3/Pi^2)*n^2. - Steven Finch, Feb 16 2006
a(n) is the highest degree of irreducible polynomial dividing 1 + x + x^2 + ... + x^(n-1) = (x^n - 1)/(x - 1). - Alexander Adamchuk, Sep 02 2006, corrected Sep 27 2006
a(p) = p - 1 for prime p. a(n) is even for n > 2. For n > 2, a(n)/2 = A023022(n) = number of partitions of n into 2 ordered relatively prime parts. - Alexander Adamchuk, Jan 25 2007
Number of automorphisms of the cyclic group of order n. - Benoit Jubin, Aug 09 2008
a(n+2) equals the number of palindromic Sturmian words of length n which are "bispecial", prefix or suffix of two Sturmian words of length n + 1. - Fred Lunnon, Sep 05 2010
Suppose that a and n are coprime positive integers, then by Euler's totient theorem, any factor of n divides a^phi(n) - 1. - Lei Zhou, Feb 28 2012
If m has k prime factors, (p_1, p_2, ..., p_k), then phi(m*n) = (Product_{i=1..k} phi (p_i*n))/phi(n)^(k-1). For example, phi(42*n) = phi(2*n)*phi(3*n)*phi(7*n)/phi(n)^2. - Gary Detlefs, Apr 21 2012
Sum_{n>=1} a(n)/n! = 1.954085357876006213144... This sum is referenced in Plouffe's inverter. - Alexander R. Povolotsky, Feb 02 2013 (see A336334. - Hugo Pfoertner, Jul 22 2020)
The order of the multiplicative group of units modulo n. - Michael Somos, Aug 27 2013
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all positive integers n and m. - Michael Somos, Dec 30 2016
From Eric Desbiaux, Jan 01 2017: (Start)
a(n) equals the Ramanujan sum c_n(n) (last term on n-th row of triangle A054533).
a(n) equals the Jordan function J_1(n) (cf. A007434, A059376, A059377, which are the Jordan functions J_2, J_3, J_4, respectively). (End)
For n > 1, a(n) appears to be equal to the number of semi-meander solutions for n with top arches containing exactly 2 mountain ranges and exactly 2 arches of length 1. - Roger Ford, Oct 11 2017
a(n) is the minimum dimension of a lattice able to generate, via cut-and-project, the quasilattice whose diffraction pattern features n-fold rotational symmetry. The case n=15 is the first n > 1 in which the following simpler definition fails: "a(n) is the minimum dimension of a lattice with n-fold rotational symmetry". - Felix Flicker, Nov 08 2017
Number of cyclic Latin squares of order n with the first row in ascending order. - Eduard I. Vatutin, Nov 01 2020
a(n) is the number of rational numbers p/q >= 0 (in lowest terms) such that p + q = n. - Rémy Sigrist, Jan 17 2021
From Richard L. Ollerton, May 08 2021: (Start)
Formulas for the numerous OEIS entries involving Dirichlet convolution of a(n) and some sequence h(n) can be derived using the following (n >= 1):
Sum_{d|n} phi(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k)) [see P. H. van der Kamp link] = Sum_{d|n} h(d)*phi(n/d) = Sum_{k=1..n} h(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). Similarly,
Sum_{d|n} phi(d)*h(d) = Sum_{k=1..n} h(n/gcd(n,k)) = Sum_{k=1..n} h(gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)).
More generally,
Sum_{d|n} h(d) = Sum_{k=1..n} h(gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))/phi(n/gcd(n,k)).
In particular, for sequences involving the Möbius transform:
Sum_{d|n} mu(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)), where mu = A008683.
Use of gcd(n,k)*lcm(n,k) = n*k and phi(gcd(n,k))*phi(lcm(n,k)) = phi(n)*phi(k) provide further variations. (End)
From Richard L. Ollerton, Nov 07 2021: (Start)
Formulas for products corresponding to the sums above may found using the substitution h(n) = log(f(n)) where f(n) > 0 (for example, cf. formulas for the sum A018804 and product A067911 of gcd(n,k)):
Product_{d|n} f(n/d)^phi(d) = Product_{k=1..n} f(gcd(n,k)) = Product_{d|n} f(d)^phi(n/d) = Product_{k=1..n} f(n/gcd(n,k))^(phi(gcd(n,k))/phi(n/gcd(n,k))),
Product_{d|n} f(d)^phi(d) = Product_{k=1..n} f(n/gcd(n,k)) = Product_{k=1..n} f(gcd(n,k))^(phi(gcd(n,k))/phi(n/gcd(n,k))),
Product_{d|n} f(d) = Product_{k=1..n} f(gcd(n,k))^(1/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(1/phi(n/gcd(n,k))),
Product_{d|n} f(n/d)^mu(d) = Product_{k=1..n} f(gcd(n,k))^(mu(n/gcd(n,k))/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(mu(gcd(n,k))/phi(n/gcd(n,k))), where mu = A008683. (End)
a(n+1) is the number of binary words with exactly n distinct subsequences (when n > 0). - Radoslaw Zak, Nov 29 2021

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 2*x^6 + 6*x^7 + 4*x^8 + 6*x^9 + 4*x^10 + ...
a(8) = 4 with {1, 3, 5, 7} units modulo 8. a(10) = 4 with {1, 3, 7, 9} units modulo 10. - _Michael Somos_, Aug 27 2013
From _Eduard I. Vatutin_, Nov 01 2020: (Start)
The a(5)=4 cyclic Latin squares with the first row in ascending order are:
  0 1 2 3 4   0 1 2 3 4   0 1 2 3 4   0 1 2 3 4
  1 2 3 4 0   2 3 4 0 1   3 4 0 1 2   4 0 1 2 3
  2 3 4 0 1   4 0 1 2 3   1 2 3 4 0   3 4 0 1 2
  3 4 0 1 2   1 2 3 4 0   4 0 1 2 3   2 3 4 0 1
  4 0 1 2 3   3 4 0 1 2   2 3 4 0 1   1 2 3 4 0
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 24.
  • M. Baake and U. Grimm, Aperiodic Order Vol. 1: A Mathematical Invitation, Encyclopedia of Mathematics and its Applications 149, Cambridge University Press, 2013: see Tables 3.1 and 3.2.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 193.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 154-156.
  • C. W. Curtis, Pioneers of Representation Theory ..., Amer. Math. Soc., 1999; see p. 3.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Ellipses, Paris, 2004, Problème 529, pp. 71-257.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, Chapter V.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 115-119.
  • Carl Friedrich Gauss, "Disquisitiones Arithmeticae", Yale University Press, 1965; see p. 21.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math., 2n-d ed.; Addison-Wesley, 1994, p. 137.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B36.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 60, 62, 63, 288, 323, 328, 330.
  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry, Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, pages 261-264, the Coach theorem.
  • Jean-Marie Monier, Analyse, Exercices corrigés, 2ème année MP, Dunod, 1997, Exercice 3.2.21 pp. 281-294.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, New York, Heidelberg, Berlin, 2 vols., 1976, Vol. II, problem 71, p. 126.
  • Paulo Ribenboim, The New Book of Prime Number Records.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 28-33.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 162-167.

Crossrefs

Cf. A002088 (partial sums), A008683, A003434 (steps to reach 1), A007755, A049108, A002202 (values), A011755 (Sum k*phi(k)).
Cf. also A005277 (nontotient numbers). For inverse see A002181, A006511, A058277.
Jordan function J_k(n) is a generalization - see A059379 and A059380 (triangle of values of J_k(n)), this sequence (J_1), A007434 (J_2), A059376 (J_3), A059377 (J_4), A059378 (J_5).
Row sums of triangles A134540, A127448, A143239, A143353 and A143276.
Equals right and left borders of triangle A159937. - Gary W. Adamson, Apr 26 2009
Values for prime powers p^e: A006093 (e=1), A036689 (e=2), A135177 (e=3), A138403 (e=4), A138407 (e=5), A138412 (e=6).
Values for perfect powers n^e: A002618 (e=2), A053191 (e=3), A189393 (e=4), A238533 (e=5), A306411 (e=6), A239442 (e=7), A306412 (e=8), A239443 (e=9).
Cf. A076479.
Cf. A023900 (Dirichlet inverse of phi), A306633 (Dgf at s=3).

Programs

  • Axiom
    [eulerPhi(n) for n in 1..100]
    
  • Haskell
    a n = length (filter (==1) (map (gcd n) [1..n])) -- Allan C. Wechsler, Dec 29 2014
    
  • Julia
    # Computes the first N terms of the sequence.
    function A000010List(N)
        phi = [i for i in 1:N + 1]
        for i in 2:N + 1
            if phi[i] == i
                for j in i:i:N + 1
                    phi[j] -= div(phi[j], i)
        end end end
    return phi end
    println(A000010List(68))  # Peter Luschny, Sep 03 2023
  • Magma
    [ EulerPhi(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    with(numtheory): A000010 := phi; [ seq(phi(n), n=1..100) ]; # version 1
    with(numtheory): phi := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := n*mul((1-1/t1[i][1]),i=1..nops(t1)); end; # version 2
    # Alternative without library function:
    A000010List := proc(N) local i, j, phi;
        phi := Array([seq(i, i = 1 .. N+1)]);
        for i from 2 to N + 1 do
            if phi[i] = i then
                for j from i by i to N + 1 do
                    phi[j] := phi[j] - iquo(phi[j], i) od
            fi od;
    return phi end:
    A000010List(68);  # Peter Luschny, Sep 03 2023
  • Mathematica
    Array[EulerPhi, 70]
  • Maxima
    makelist(totient(n),n,0,1000); /* Emanuele Munarini, Mar 26 2011 */
    
  • PARI
    {a(n) = if( n==0, 0, eulerphi(n))}; /* Michael Somos, Feb 05 2011 */
    
  • Python
    from sympy.ntheory import totient
    print([totient(i) for i in range(1, 70)])  # Indranil Ghosh, Mar 17 2017
    
  • Python
    # Note also the implementation in A365339.
    
  • Sage
    def A000010(n): return euler_phi(n) # Jaap Spies, Jan 07 2007
    
  • Sage
    [euler_phi(n) for n in range(1, 70)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

phi(n) = n*Product_{distinct primes p dividing n} (1 - 1/p).
Sum_{d divides n} phi(d) = n.
phi(n) = Sum_{d divides n} mu(d)*n/d, i.e., the Moebius transform of the natural numbers; mu() = Moebius function A008683().
Dirichlet generating function Sum_{n>=1} phi(n)/n^s = zeta(s-1)/zeta(s). Also Sum_{n >= 1} phi(n)*x^n/(1 - x^n) = x/(1 - x)^2.
Multiplicative with a(p^e) = (p - 1)*p^(e-1). - David W. Wilson, Aug 01 2001
Sum_{n>=1} (phi(n)*log(1 - x^n)/n) = -x/(1 - x) for -1 < x < 1 (cf. A002088) - Henry Bottomley, Nov 16 2001
a(n) = binomial(n+1, 2) - Sum_{i=1..n-1} a(i)*floor(n/i) (see A000217 for inverse). - Jon Perry, Mar 02 2004
It is a classical result (certainly known to Landau, 1909) that lim inf n/phi(n) = 1 (taking n to be primes), lim sup n/(phi(n)*log(log(n))) = e^gamma, with gamma = Euler's constant (taking n to be products of consecutive primes starting from 2 and applying Mertens' theorem). See e.g. Ribenboim, pp. 319-320. - Pieter Moree, Sep 10 2004
a(n) = Sum_{i=1..n} |k(n, i)| where k(n, i) is the Kronecker symbol. Also a(n) = n - #{1 <= i <= n : k(n, i) = 0}. - Benoit Cloitre, Aug 06 2004 [Corrected by Jianing Song, Sep 25 2018]
Conjecture: Sum_{i>=2} (-1)^i/(i*phi(i)) exists and is approximately 0.558 (A335319). - Orges Leka (oleka(AT)students.uni-mainz.de), Dec 23 2004
From Enrique Pérez Herrero, Sep 07 2010: (Start)
a(n) = Sum_{i=1..n} floor(sigma_k(i*n)/sigma_k(i)*sigma_k(n)), where sigma_2 is A001157.
a(n) = Sum_{i=1..n} floor(tau_k(i*n)/tau_k(i)*tau_k(n)), where tau_3 is A007425.
a(n) = Sum_{i=1..n} floor(rad(i*n)/rad(i)*rad(n)), where rad is A007947. (End)
a(n) = A173557(n)*A003557(n). - R. J. Mathar, Mar 30 2011
a(n) = A096396(n) + A096397(n). - Reinhard Zumkeller, Mar 24 2012
phi(p*n) = phi(n)*(floor(((n + p - 1) mod p)/(p - 1)) + p - 1), for primes p. - Gary Detlefs, Apr 21 2012
For odd n, a(n) = 2*A135303((n-1)/2)*A003558((n-1)/2) or phi(n) = 2*c*k; the Coach theorem of Pedersen et al. Cf. A135303. - Gary W. Adamson, Aug 15 2012
G.f.: Sum_{n>=1} mu(n)*x^n/(1 - x^n)^2, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 05 2015
a(n) = n - cototient(n) = n - A051953(n). - Omar E. Pol, May 14 2016
a(n) = lim_{s->1} n*zeta(s)*(Sum_{d divides n} A008683(d)/(e^(1/d))^(s-1)), for n > 1. - Mats Granvik, Jan 26 2017
Conjecture: a(n) = Sum_{a=1..n} Sum_{b=1..n} Sum_{c=1..n} 1 for n > 1. The sum is over a,b,c such that n*c - a*b = 1. - Benedict W. J. Irwin, Apr 03 2017
a(n) = Sum_{j=1..n} gcd(j, n) cos(2*Pi*j/n) = Sum_{j=1..n} gcd(j, n) exp(2*Pi*i*j/n) where i is the imaginary unit. Notice that the Ramanujan's sum c_n(k) := Sum_{j=1..n, gcd(j, n) = 1} exp(2*Pi*i*j*k/n) gives a(n) = Sum_{k|n} k*c_(n/k)(1) = Sum_{k|n} k*mu(n/k). - Michael Somos, May 13 2018
G.f.: x*d/dx(x*d/dx(log(Product_{k>=1} (1 - x^k)^(-mu(k)/k^2)))), where mu(n) = A008683(n). - Mamuka Jibladze, Sep 20 2018
a(n) = Sum_{d|n} A007431(d). - Steven Foster Clark, May 29 2019
G.f. A(x) satisfies: A(x) = x/(1 - x)^2 - Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, Sep 06 2019
a(n) >= sqrt(n/2) (Nicolas). - Hugo Pfoertner, Jun 01 2020
a(n) > n/(exp(gamma)*log(log(n)) + 5/(2*log(log(n)))), except for n=223092870 (Rosser, Schoenfeld). - Hugo Pfoertner, Jun 02 2020
From Bernard Schott, Nov 28 2020: (Start)
Sum_{m=1..n} 1/a(m) = A028415(n)/A048049(n) -> oo when n->oo.
Sum_{n >= 1} 1/a(n)^2 = A109695.
Sum_{n >= 1} 1/a(n)^3 = A335818.
Sum_{n >= 1} 1/a(n)^k is convergent iff k > 1.
a(2n) = a(n) iff n is odd, and, a(2n) > a(n) iff n is even. (End) [Actually, a(2n) = 2*a(n) for even n. - Jianing Song, Sep 18 2022]
a(n) = 2*A023896(n)/n, n > 1. - Richard R. Forberg, Feb 03 2021
From Richard L. Ollerton, May 09 2021: (Start)
For n > 1, Sum_{k=1..n} phi^{(-1)}(n/gcd(n,k))*a(gcd(n,k))/a(n/gcd(n,k)) = 0, where phi^{(-1)} = A023900.
For n > 1, Sum_{k=1..n} a(gcd(n,k))*mu(rad(gcd(n,k)))*rad(gcd(n,k))/gcd(n,k) = 0.
For n > 1, Sum_{k=1..n} a(gcd(n,k))*mu(rad(n/gcd(n,k)))*rad(n/gcd(n,k))*gcd(n,k) = 0.
Sum_{k=1..n} a(gcd(n,k))/a(n/gcd(n,k)) = n. (End)
a(n) = Sum_{d|n, e|n} gcd(d, e)*mobius(n/d)*mobius(n/e) (the sum is a multiplicative function of n by Tóth, and takes the value p^e - p^(e-1) for n = p^e, a prime power). - Peter Bala, Jan 22 2024
Sum_{n >= 1} phi(n)*x^n/(1 + x^n) = x + 3*x^3 + 5*x^5 + 7*x^7 + ... = Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(4*n-2)). For the first equality see Pólya and Szegő, problem 71, p. 126. - Peter Bala, Feb 29 2024
Conjecture: a(n) = lim_{k->oo} (n^(k + 1))/A000203(n^k). - Velin Yanev, Dec 04 2024 [A000010(p) = p-1, A000203(p^k) = (p^(k+1)-1)/(p-1), so the conjecture is true if n is prime. - Vaclav Kotesovec, Dec 19 2024]

A023896 Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention.

Original entry on oeis.org

1, 1, 3, 4, 10, 6, 21, 16, 27, 20, 55, 24, 78, 42, 60, 64, 136, 54, 171, 80, 126, 110, 253, 96, 250, 156, 243, 168, 406, 120, 465, 256, 330, 272, 420, 216, 666, 342, 468, 320, 820, 252, 903, 440, 540, 506, 1081, 384, 1029, 500, 816, 624, 1378, 486, 1100, 672
Offset: 1

Views

Author

Keywords

Comments

Sum of totatives of n, i.e., sum of integers up to n and coprime to n.
a(1) = 1, since 1 is coprime to any positive integer.
Row sums of A038566. - Wolfdieter Lang, May 03 2015
Islam & Manzoor prove that a(n) is an injection for n > 1, see links. In other words, if a(m) = a(n), and min(m, n) > 1, then m = n. - Muhammed Hedayet, May 19 2024

Examples

			G.f. = x + x^2 + 3*x^3 + 4*x^4 + 10*x^5 + 6*x^6 + 21*x^7 + 16*x^8 + 27*x^9 + ...
a(12) = 1 + 5 + 7 + 11 = 24.
n = 40: The smallest positive reduced residue system modulo 40 is {1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39}. The sum is a(40) = 320. Average is 20.
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 16, the function phi_1(n).
  • David M. Burton, Elementary Number Theory, p. 171.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2001, p. 163.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.

Crossrefs

Programs

  • Haskell
    a023896 = sum . a038566_row  -- Reinhard Zumkeller, Mar 04 2012
    
  • Magma
    [1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015
    
  • Maple
    A023896 := proc(n)
        if n = 1 then
            1;
        else
            n*numtheory[phi](n)/2 ;
        end if;
    end proc: # R. J. Mathar, Sep 26 2013
  • Mathematica
    a[ n_ ] = n/2*EulerPhi[ n ]; a[ 1 ] = 1; Table[a[n], {n, 56}]
    a[ n_] := If[ n < 2, Boole[n == 1], Sum[ k Boole[1 == GCD[n, k]], { k, n}]]; (* Michael Somos, Jul 08 2014 *)
  • PARI
    {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
    
  • PARI
    A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021
    
  • Python
    from sympy import totient
    def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022
    
  • SageMath
    def A023896(n): return 1 if n == 1 else n*euler_phi(n)//2
    print([A023896(n) for n in range(1, 57)])  # Peter Luschny, Dec 03 2023

Formula

a(n) = n*A023022(n) for n > 2.
a(n) = phi(n^2)/2 = n*phi(n)/2 = A002618(n)/2 if n > 1, a(1)=1. See the Apostol reference for this exercise.
a(n) = Sum_{1 <= k < n, gcd(k, n) = 1} k.
If n = p is a prime, a(p) = T(p-1) where T(k) is the k-th triangular number (A000217). - Robert G. Wilson v, Jul 31 2004
Equals A054521 * [1,2,3,...]. - Gary W. Adamson, May 20 2007
a(n) = A053818(n) * A175506(n) / A175505(n). - Jaroslav Krizek, Aug 01 2010
If m,n > 1 and gcd(m,n) = 1 then a(m*n) = 2*a(m)*a(n). - Thomas Ordowski, Nov 09 2014
G.f.: Sum_{n>=1} mu(n)*n*x^n/(1-x^n)^3, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 24 2015
G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019
For n > 1: a(n) = (n*A076512(n)/2)*A009195(n). - Jamie Morken, Dec 16 2019
Sum_{n>=1} 1/a(n) = 2 * A065484 - 1 = 3.407713... . - Amiram Eldar, Oct 09 2023

Extensions

Typos in programs corrected by Zak Seidov, Aug 03 2010
Name and example edited by Wolfdieter Lang, May 03 2015

A187360 Coefficient array for minimal polynomials of 2*cos(Pi/n) (rising powers of x).

Original entry on oeis.org

2, 1, 0, 1, -1, 1, -2, 0, 1, -1, -1, 1, -3, 0, 1, 1, -2, -1, 1, 2, 0, -4, 0, 1, -1, -3, 0, 1, 5, 0, -5, 0, 1, -1, 3, 3, -4, -1, 1, 1, 0, -4, 0, 1, -1, -3, 6, 4, -5, -1, 1, -7, 0, 14, 0, -7, 0, 1, 1, -4, -4, 1, 1, 2, 0, -16, 0, 20, 0, -8, 0, 1, 1, 4, -10, -10, 15, 6, -7, -1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jul 14 2011

Keywords

Comments

The degree delta(n) of the monic integer row polynomial, call it C(n,x), is A055034(n).
This minimal polynomial of the algebraic number 2*cos(Pi/n), n>=1, is given by
C(n,x) = sum(a(n,m)*x^m,m=0..A055034(n)) = (2^delta(n))*Psi(2n,x/2), with Psi(n,x) the minimal polynomial of cos(2Pi/n), with rational coefficient array A181875/A181876. There also references and links are found. See especially Watkins and Zeitlin for Psi(n,x).
The zeros of C(n,x), n>=2, are 2*cos(Pi k/n), with k=1,...,n-1 and gcd(k,2n)=1. For n=1 the zero is -2. Alternatively, these zeros are 2*cos(Pi(2l+1)/n), with l=0,...,floor((n-2)/2) and gcd(2l+1,n)=1. For n=1 take l=0.
The first column looks like the differently signed A020513(n),n>=1.
The polynomial for row n=2^m, m>=1, coincides with the row polynomial R(2^(m-1),x) of A127672. See the factorization of these R-polynomials (also known as Chebyshev C-polynomials) given there. - Wolfdieter Lang, Sep 15 2011
From Wolfdieter Lang, Nov 04 2013: (Start)
The norm N(rho(n)) of rho(n) = 2*cos(Pi/n), n >= 1, in the algebraic number field Q(rho(n)) is given by (-1)^delta(n)* C(n, 0), with C(n, x) of degree delta(n) = A055034(n). If N(rho(n)) equals +1 or -1 then 1/rho(n), which is an element of Q(rho(n)), is in fact an integer in this number field. For the 1/rho(n) formula in terms of the C coefficients see A230079. Thus 1/rho(n) is a Q(rho(n))-integer if and only if C(n, 0) is +1 or -1 , and this happens if and only if n is from the set {A230078(k), k >= 2}.
The negation says that, for n a positive integer, 1/rho(n) is not a Q(rho(n))-integer if and only if n is 1 or of the form 2*p^m, m >= 0 and p a prime, which are the numbers of A138929 including 1.
The proof uses for case (i): n = 2*m+1, m >= 1, the fact that C(2*m+1, 0)^2 = (product( 2*cos(Pi*(2*l+1)/(2*m+1)), l=0 .. m-1 and gcd(2*l+1, 2*m+1) = 1))^2 = (product(2*cos(Pi*k/(2*m+1)), k=1..L and gcd(k, 2*m+1) = 1))^2 = cyclotomic(2*m +1, -1). See the linked Q(rho(n)) paper, eq. (31), for a product formula for cyclotomic(n, -1). With the prime factorization of 2*m+1, and the fact that only the squarefree kernel of 2*m+1 enters (see an Oct 29 2013 comment on A013595), one finds, form the formula for cyclotomic(p1*p2*...*pk, x) involving the Moebius function, cyclotomic(2*m +1, -1) = +1, m >= 1. C(1, 0) = +2. For case (ii): n even, one has C(2^m, 0) = 0, -2, +2, for m = 1 , 2, >=3, respectively (see eq. (39) of the linked Q(rho(n)) paper). For odd prime p: (-1)^((p-1)/2)*C(2*p^m, 0) = cyclotomic(2*p^m, -1) = cyclotomic(2*p, -1) = cyclotomic(p, +1) = p, for m >= 1. For more than one odd prime in the squarefree kernel of n = 2*m, m >= 1, one finds C(2*m, 0) = +1 from cyclotomic(2*p1*...*pk, -1) = +1, for k >= 2. (End)
For the conversion of the C-polynomials into sums of Chebyshev's S-polynomials (A049310) see A255237. - Wolfdieter Lang, Mar 16 2015

Examples

			n=1:  2, 1;
n=2:  0, 1;
n=3: -1, 1;
n=4: -2, 0, 1;
n=5: -1,-1, 1;
n=6: -3, 0, 1;
n=7:  1,-2,-1, 1;
n=8:  2, 0,-4, 0, 1;
n=9: -1,-3, 0, 1;
n=10: 5, 0,-5, 0, 1;
...
C(2,x) = R(1,x), C(4,x) = R(2,x), C(8,x) = R(4,x),... with R(n,x) from A127672. - _Wolfdieter Lang_, Sep 15 2011
		

Crossrefs

Cf. A192003 (row sums). A192004 (alternating row sums).

Programs

  • Maple
    f:= proc(n) local P,z,j;
       P:= factor(evala(Norm(z-convert(2*cos(Pi/n),RootOf))));
       if type(P,`^`) then P:= op(1,P) fi;
       seq(coeff(P,z,j),j=0..degree(P));
    end proc:
    seq(f(n),n=1..20); # Robert Israel, Aug 04 2015
  • Mathematica
    Flatten[ CoefficientList[ Table[ MinimalPolynomial[2*Cos[Pi/n], x], {n, 1, 17}], x]] (* Jean-François Alcover, Sep 26 2011 *)
  • PARI
    halftot(n)=if(n<=2, 1, eulerphi(n)/2); \\ A023022
    default(realprecision, 110);
    row(n) = Vecrev(algdep(2*cos(2*Pi/n), halftot(n))); \\ Michel Marcus, Sep 19 2023

Formula

a(n,m) = [x^m] C(n,x), n>=1, m=0..A055034(n), with the minimal (monic and integer) polynomial C(n,x) of 2*cos(Pi/n). See the comment above.

A220377 Number of partitions of n into three distinct and mutually relatively prime parts.

Original entry on oeis.org

1, 0, 2, 1, 3, 1, 6, 1, 7, 3, 7, 3, 14, 3, 15, 6, 14, 6, 25, 6, 22, 10, 25, 9, 42, 8, 34, 15, 37, 15, 53, 13, 48, 22, 53, 17, 78, 17, 65, 30, 63, 24, 99, 24, 88, 35, 84, 30, 126, 34, 103, 45, 103, 38, 166, 35, 124, 57, 128, 51, 184, 44, 150, 67, 172, 52, 218
Offset: 6

Views

Author

Carl Najafi, Dec 13 2012

Keywords

Comments

The Heinz numbers of these partitions are the intersection of A005117 (strict), A014612 (triples), and A302696 (coprime). - Gus Wiseman, Oct 14 2020

Examples

			For n=10 we have three such partitions: 1+2+7, 1+4+5 and 2+3+5.
From _Gus Wiseman_, Oct 14 2020: (Start)
The a(6) = 1 through a(20) = 15 triples (empty column indicated by dot, A..H = 10..17):
321  .  431  531  532  731  543  751  743  753  754  971  765  B53  875
        521       541       651       752  951  853  B51  873  B71  974
                  721       732       761  B31  871  D31  954  D51  A73
                            741       851       952       972       A91
                            831       941       B32       981       B54
                            921       A31       B41       A71       B72
                                      B21       D21       B43       B81
                                                          B52       C71
                                                          B61       D43
                                                          C51       D52
                                                          D32       D61
                                                          D41       E51
                                                          E31       F41
                                                          F21       G31
                                                                    H21
(End)
		

Crossrefs

A023022 is the 2-part version.
A101271 is the relative prime instead of pairwise coprime version.
A220377*6 is the ordered version.
A305713 counts these partitions of any length, with Heinz numbers A302797.
A307719 is the non-strict version.
A337461 is the non-strict ordered version.
A337563 is the case with no 1's.
A337605 is the pairwise non-coprime instead of pairwise coprime version.
A001399(n-6) counts strict 3-part partitions, with Heinz numbers A007304.
A008284 counts partitions by sum and length, with strict case A008289.
A318717 counts pairwise non-coprime strict partitions.
A326675 ranks pairwise coprime sets.
A327516 counts pairwise coprime partitions.
A337601 counts 3-part partitions whose distinct parts are pairwise coprime.

Programs

  • Mathematica
    Table[Length@Select[ IntegerPartitions[ n, {3}], #[[1]] != #[[2]] != #[[3]] && GCD[#[[1]], #[[2]]] == 1 && GCD[#[[1]], #[[3]]] == 1 && GCD[#[[2]], #[[3]]] == 1 &], {n, 6, 100}]
    Table[Count[IntegerPartitions[n,{3}],?(CoprimeQ@@#&&Length[ Union[#]] == 3&)],{n,6,100}] (* _Harvey P. Dale, May 22 2020 *)
  • PARI
    a(n)=my(P=partitions(n));sum(i=1,#P,#P[i]==3&&P[i][1]Charles R Greathouse IV, Dec 14 2012

Formula

a(n > 2) = A307719(n) - 1. - Gus Wiseman, Oct 15 2020
Showing 1-10 of 80 results. Next