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 113 results. Next

A063445 Moebius transform of f(x) = EulerPhi(x^2) function (A002618).

Original entry on oeis.org

1, 1, 5, 6, 19, 5, 41, 24, 48, 19, 109, 30, 155, 41, 95, 96, 271, 48, 341, 114, 205, 109, 505, 120, 480, 155, 432, 246, 811, 95, 929, 384, 545, 271, 779, 288, 1331, 341, 775, 456, 1639, 205, 1805, 654, 912, 505, 2161, 480, 2016, 480, 1355, 930, 2755, 432
Offset: 1

Views

Author

Labos Elemer, Jul 24 2001

Keywords

Comments

Same as Moebius transform of g(x) = x*EulerPhi(x). - Benoit Cloitre, Apr 05 2002

Examples

			For n=20, divisors = {1,2,4,5,10,20}, phi(d^2) = {1,2,8,20,40,160}, mu(20/d) = {0,1,-1,0,-1,1}, a(20) = 0 + 2 - 8 + 0 - 40 + 160 = 114.
a(20) = a(4)*a(5) = (16 - 8 - 4 + 2)*(25 - 5 - 1) = 6*19 = 114.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[EulerPhi[d]*MoebiusMu[n/d]*d, {d, Divisors[n]}], {n, 1, 50}] (* Vaclav Kotesovec, Feb 01 2019 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d*eulerphi(d)*moebius(n/d)))

Formula

a(n) = Sum_{d|n} phi(d^2)*mu(n/d).
Multiplicative with a(p) = p^2 - p - 1 and a(p^e) = p^(2*e) - p^(2*e-1) - p^(2*e-2) + p^(2*e-3), e > 1. - Vladeta Jovovic, Jul 29 2001
Dirichlet g.f. zeta(s-2)/(zeta(s)*zeta(s-1)). - R. J. Mathar, Feb 09 2011
Sum_{k=1..n} a(k) ~ 2*n^3 / (Pi^2 * Zeta(3)). - Vaclav Kotesovec, Feb 01 2019
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + 1/(p^2-p-1) + p/((p-1)^3 * (p+1)^2)) = 3.037448431566721466562170968413075105160439538735056586164601312913619316... - Vaclav Kotesovec, Sep 20 2020
a(n) = Sum_{1 <= i, j <= n} gcd(i, j, n)*moebius(gcd(i, j, n)) = Sum_{d divides n} d*moebius(d)*J_2(n/d), where J_2 is the Jordan totient function A007434. - Peter Bala, Jan 21 2024

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

A064987 a(n) = n*sigma(n).

Original entry on oeis.org

1, 6, 12, 28, 30, 72, 56, 120, 117, 180, 132, 336, 182, 336, 360, 496, 306, 702, 380, 840, 672, 792, 552, 1440, 775, 1092, 1080, 1568, 870, 2160, 992, 2016, 1584, 1836, 1680, 3276, 1406, 2280, 2184, 3600, 1722, 4032, 1892, 3696, 3510, 3312, 2256, 5952
Offset: 1

Views

Author

Vladeta Jovovic, Oct 30 2001

Keywords

Comments

Dirichlet convolution of sigma_2(n)=A001157(n) with phi(n)=A000010(n). - Vladeta Jovovic, Oct 27 2002
Equals row sums of triangle A143311 and of triangle A143308. - Gary W. Adamson, Aug 06 2008
a(n) is also the sum of all n's present in A244580, or in other words, a(n) is also the volume (or number of cubes) below the terraces of the n-th level of the staircase described in A244580 (see also A237593). - Omar E. Pol, Oct 11 2018
If n is a superperfect number then sigma(n) is a Mersenne prime and a(n) is a perfect number, a(A019279(k)) = A000396(k), k >= 1, assuming there are no odd perfect numbers. - Omar E. Pol, Apr 15 2020

References

  • B. C. Berndt, Ramanujan's theory of theta-functions, Theta functions: from the classical to the modern, Amer. Math. Soc., Providence, RI, 1993, pp. 1-63. MR 94m:11054. see page 43.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, pp. 166-167.

Crossrefs

Main diagonal of A319073.
Cf. A000203, A038040, A002618, A000010, A001157, A143308, A143311, A004009, A006352, A000594, A126832, A069097 (Mobius transform), A001001 (inverse Mobius transform), A237593, A244580.

Programs

  • GAP
    a:=List([1..50],n->n*Sigma(n));; Print(a); # Muniru A Asiru, Jan 01 2019
  • Haskell
    a064987 n = a000203 n * n  -- Reinhard Zumkeller, Jan 21 2014
    
  • Magma
    [n*SumOfDivisors(n): n in [1..70]]; // Vincenzo Librandi, Jan 01 2019
    
  • Maple
    with(numtheory): [n*sigma(n)$n=1..50]; # Muniru A Asiru, Jan 01 2019
  • Mathematica
    # DivisorSigma[1,#]&/@Range[80]  (* Harvey P. Dale, Mar 12 2011 *)
  • MuPAD
    numlib::sigma(n)*n$ n=1..81 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if ( n==0, 0, n * sigma(n))}
    
  • PARI
    { for (n=1, 1000, write("b064987.txt", n, " ", n*sigma(n)) ) } \\ Harry J. Smith, Oct 02 2009
    

Formula

Multiplicative with a(p^e) = p^e * (p^(e+1) - 1) / (p - 1).
G.f.: Sum_{n>0} n^2*x^n/(1-x^n)^2. - Vladeta Jovovic, Oct 27 2002
G.f.: phi_{2, 1}(x) where phi_{r, s}(x) = Sum_{n, m>0} m^r * n^s * x^{m*n}. - Michael Somos, Apr 02 2003
G.f. is also (Q - P^2) / 288 where P, Q are Ramanujan Lambert series. - Michael Somos, Apr 02 2003. See the Hardy reference, p. 136, eq. (10.5.4) (with a proof). For Q and P, (10.5.6) and (10.5.5), see E_4 A004009 and E_2 A006352, respectively. - Wolfdieter Lang, Jan 30 2017
Convolution of A000118 and A186690. Dirichlet convolution of A000027 and A000290. - Michael Somos, Mar 25 2012
Dirichlet g.f.: zeta(s-1)*zeta(s-2). - R. J. Mathar, Feb 16 2011
a(n) = A009194(n)*A009242(n). - Michel Marcus, Oct 23 2013
a(n) (mod 5) = A126832(n) = A000594(n) (mod 5). See A126832 for references. - Wolfdieter Lang, Feb 03 2017
L.g.f.: Sum_{k>=1} k*x^k/(1 - x^k) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 13 2017
Sum_{k>=1} 1/a(k) = 1.4383899259334187832765458631783591251241657856627653748389234270650138768... - Vaclav Kotesovec, Sep 20 2020
From Peter Bala, Jan 21 2021: (Start)
G.f.: Sum_{n >= 1} n*q^n*(1 + q^n)/(1 - q^n)^3 (use the expansion x*(1 + x)/(1 - x)^3 = x + 2^2*x^2 + 3^2*x^3 + 4^2*x^4 + ...).
A faster converging g.f.: Sum_{n >= 1} q^(n^2)*( n^3*q^(3*n) - (n^3 + 3*n^2 - n)*q^(2*n) - (n^3 - 3*n^2 - n)*q^n + n^3 )/(1 - q^n)^3 - differentiate equation 5 in Arndt w.r.t. both x and q and then set x = 1. (End)
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} sigma_2(gcd(n,k)).
a(n) = Sum_{k=1..n} sigma_2(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
From Peter Bala, Jan 22 2024: (Start)
a(n) = Sum_{1 <= j, k <= n} sigma_1( gcd(j, k, n) ).
a(n) = Sum_{d divides n} sigma_1(d)*J_2(n/d) = Sum_{d divides n} sigma_2(d)* phi(n/d), where the Jordan totient function J_2(n) = A007434(n). (End)

A057660 a(n) = Sum_{k=1..n} n/gcd(n,k).

Original entry on oeis.org

1, 3, 7, 11, 21, 21, 43, 43, 61, 63, 111, 77, 157, 129, 147, 171, 273, 183, 343, 231, 301, 333, 507, 301, 521, 471, 547, 473, 813, 441, 931, 683, 777, 819, 903, 671, 1333, 1029, 1099, 903, 1641, 903, 1807, 1221, 1281, 1521, 2163, 1197, 2101, 1563, 1911, 1727
Offset: 1

Views

Author

Henry Gould, Oct 15 2000

Keywords

Comments

Also sum of the orders of the elements in a cyclic group with n elements, i.e., row sums of A054531. - Avi Peretz (njk(AT)netvision.net.il), Mar 31 2001
Also inverse Moebius transform of EulerPhi(n^2), A002618.
Sequence is multiplicative with a(p^e) = (p^(2*e+1)+1)/(p+1). Example: a(10) = a(2)*a(5) = 3*21 = 63.
a(n) is the number of pairs (a, b) such that the equation ax = b is solvable in the ring (Zn, +, x). See the Mathematical Reflections link. - Michel Marcus, Jan 07 2017
From Jake Duzyk, Jun 06 2023: (Start)
These are the "contraharmonic means" of the improper divisors of square integers (inclusive of 1 and the square integer itself).
Permitting "Contraharmonic Divisor Numbers" to be defined analogously to Øystein Ore's Harmonic Divisor Numbers, the only numbers for which there exists an integer contraharmonic mean of the divisors are the square numbers, and a(n) is the n-th integer contraharmonic mean, expressible also as the sum of squares of divisors of n^2 divided by the sum of divisors of n^2. That is, a(n) = sigma_2(n^2)/sigma(n^2).
(a(n) = A001157(k)/A000203(k) where k is the n-th number such that A001157(k)/A000203(k) is an integer, i.e., k = n^2.)
This sequence is an analog of A001600 (Harmonic means of divisors of harmonic numbers) and A102187 (Arithmetic means of divisors of arithmetic numbers). (End)

References

  • David M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 152.
  • H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), Vol. 39, No. 1 (1997), pp. 11-35.
  • H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), Vol. 39, No. 2 (1997), pp. 183-194.

Crossrefs

Programs

  • Haskell
    a057660 n = sum $ map (div n) $ a050873_row n
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Mathematica
    Table[ DivisorSigma[ 2, n^2 ] / DivisorSigma[ 1, n^2 ], {n, 1, 128} ]
    Table[Total[Denominator[Range[n]/n]], {n, 55}] (* Alonso del Arte, Oct 07 2011 *)
    f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d*eulerphi(d)))
    
  • PARI
    a(n)=sumdivmult(n,d, eulerphi(d)*d) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import gcd
    def A057660(n): return sum(n//gcd(n,k) for k in range(1,n+1)) # Chai Wah Wu, Aug 24 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A057660(n): return prod((p**((e<<1)+1)+1)//(p+1) for p,e in factorint(n).items()) # Chai Wah Wu, Aug 05 2024

Formula

a(n) = Sum_{d|n} d*A000010(d) = Sum_{d|n} d*A054522(n,d), sum of d times phi(d) for all divisors d of n, where phi is Euler's phi function.
a(n) = sigma_2(n^2)/sigma_1(n^2) = A001157(A000290(n))/A000203(A000290(n)) = A001157(A000290(n))/A065764(n). - Labos Elemer, Nov 21 2001
a(n) = Sum_{d|n} A000010(d^2). - Enrique Pérez Herrero, Jul 12 2010
a(n) <= (n-1)*n + 1, with equality if and only if n is noncomposite. - Daniel Forgues, Apr 30 2013
G.f.: Sum_{n >= 1} n*phi(n)*x^n/(1 - x^n) = x + 3*x^2 + 7*x^3 + 11*x^4 + .... Dirichlet g.f.: sum {n >= 1} a(n)/n^s = zeta(s)*zeta(s-2)/zeta(s-1) for Re s > 3. Cf. A078747 and A176797. - Peter Bala, Dec 30 2013
a(n) = Sum_{i=1..n} numerator(n/i). - Wesley Ivan Hurt, Feb 26 2017
L.g.f.: -log(Product_{k>=1} (1 - x^k)^phi(k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 21 2018
From Richard L. Ollerton, May 10 2021: (Start)
a(n) = Sum_{k=1..n} lcm(n,k)/k.
a(n) = Sum_{k=1..n} gcd(n,k)*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
From Vaclav Kotesovec, Jun 13 2021: (Start)
Sum_{k=1..n} a(k)/k ~ 3*zeta(3)*n^2/Pi^2.
Sum_{k=1..n} k^2/a(k) ~ A345294 * n.
Sum_{k=1..n} k*A000010(k)/a(k) ~ A345295 * n. (End)
Sum_{k=1..n} a(k) ~ 2*zeta(3)*n^3/Pi^2. - Vaclav Kotesovec, Jun 10 2023

Extensions

More terms from James Sellers, Oct 16 2000

A036689 Product of a prime and the previous number.

Original entry on oeis.org

2, 6, 20, 42, 110, 156, 272, 342, 506, 812, 930, 1332, 1640, 1806, 2162, 2756, 3422, 3660, 4422, 4970, 5256, 6162, 6806, 7832, 9312, 10100, 10506, 11342, 11772, 12656, 16002, 17030, 18632, 19182, 22052, 22650, 24492, 26406, 27722, 29756, 31862, 32580, 36290, 37056, 38612, 39402, 44310
Offset: 1

Views

Author

Keywords

Comments

Records in A002618. - Artur Jasinski, Jan 23 2008
Also records in A174857. - Vladimir Shevelev, Mar 31 2010

Examples

			2*1, 3*2, 5*4, 7*6, 11*10, 13*12, 17*16, ...
		

Crossrefs

Twice the terms of A008837.
Subsequence of A002378 (oblong numbers).
Column 1 of A257251. (Row 1 of A257252.)
Column 2 of A379010.

Programs

Formula

a(n) = prime(n) * (prime(n) - 1).
a(n) = phi(prime(n)^2) = A000010(A001248(n)).
a(n) = prime(n) * phi(prime(n)). - Artur Jasinski, Jan 23 2008
From Reinhard Zumkeller, Sep 17 2011: (Start)
a(n) = A000040(n) * A006093(n) = A001248(n) - A000040(n).
A006530(a(n)) = A000040(n). (End)
a(n) = A009262(prime(n)). - Enrique Pérez Herrero, May 12 2012
a(n) = prime(n)! mod (prime(n)^2). - J. M. Bergot, Apr 10 2014
a(n) = 2*A008837(n). - Antti Karttunen, May 01 2015
Sum_{n>=1} 1/a(n) = A136141. - Amiram Eldar, Nov 09 2020
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(2)*zeta(3)/zeta(6) (A082695).
Product_{n>=1} (1 - 1/a(n)) = A005596. (End)

Extensions

Deleted two incorrect comments. - N. J. A. Sloane, May 07 2020

A053191 a(n) = n^2 * phi(n).

Original entry on oeis.org

1, 4, 18, 32, 100, 72, 294, 256, 486, 400, 1210, 576, 2028, 1176, 1800, 2048, 4624, 1944, 6498, 3200, 5292, 4840, 11638, 4608, 12500, 8112, 13122, 9408, 23548, 7200, 28830, 16384, 21780, 18496, 29400, 15552, 49284, 25992, 36504, 25600, 67240
Offset: 1

Views

Author

Labos Elemer, Mar 02 2000

Keywords

Comments

Number of invertible 2 X 2 symmetric matrices over Z(n). - T. D. Noe, Jan 13 2006
Note that A115077 gives the number of 2 X 2 symmetric matrices having nonzero determinant. However, for composite n, a nonzero determinant is not sufficient for the matrix to be invertible; the determinant must also be relatively prime to n. - T. D. Noe, Jan 13 2006
Also Euler phi function of n^3.
For n^k, EulerPhi(n^k) = n^(k-1)*EulerPhi(n). The same holds if Phi is replaced by the cototient function.
Also, the sum of the degrees of the irreducible representations of the group GL(2,Z_n) (sequence A000252). - Sharon Sela (sharonsela(AT)hotmail.com), Feb 06 2002

Examples

			n=5: n^3 = 125, EulerPhi(125) = 125 - 25 = 100.
		

Crossrefs

Cf. A000252 (number of invertible 2 X 2 matrices over Z(n)), A115075, A115076, A115077.

Programs

  • Magma
    [ n^2*EulerPhi(n) : n in [1..100] ]; // Vincenzo Librandi, Apr 21 2011
    
  • Maple
    with(numtheory):a:=n->phi(n^3): seq(a(n), n=1..41); # Zerinvary Lajos, Oct 07 2007
  • Mathematica
    Table[cnt=0; Do[m={{a, b}, {b, c}}; If[Det[m, Modulus->n]>0 && MatrixQ[Inverse[m, Modulus->n]], cnt++ ], {a, 0, n-1}, {b, 0, n-1}, {c, 0, n-1}]; cnt, {n, 2, 50}] (* T. D. Noe, Jan 13 2006 *)
    Table[n^2*EulerPhi[n],{n,1,40}] (* Vladimir Joseph Stephan Orlovsky, Nov 10 2009 *)
  • PARI
    a(n) = n^2*eulerphi(n); \\ Michel Marcus, Oct 31 2017
  • Sage
    [n^2*euler_phi(n) for n in range(1, 42)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = n^2 * phi(n) = A000010(n^3).
Dirichlet g.f.: zeta(s-3)/zeta(s-2). - R. J. Mathar, Feb 09 2011
The n-th term of the Dirichlet inverse is n^2 * A023900(n) = (-1)^omega(n) * a(n) / A003557(n), where omega = A001221. - Álvar Ibeas, Nov 24 2017
Sum_{n>=1} 1/a(n) = Product_{p prime} (1 + p/(p^4 - p^3 - p + 1)) = 1.38097852211302096879... - Amiram Eldar, Dec 06 2020

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 05 2007

A127473 a(n) = phi(n)^2.

Original entry on oeis.org

1, 1, 4, 4, 16, 4, 36, 16, 36, 16, 100, 16, 144, 36, 64, 64, 256, 36, 324, 64, 144, 100, 484, 64, 400, 144, 324, 144, 784, 64, 900, 256, 400, 256, 576, 144, 1296, 324, 576, 256, 1600, 144, 1764, 400, 576, 484, 2116, 256, 1764, 400, 1024, 576, 2704, 324, 1600
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Number of maps of the form j |--> m*j + d with gcd(m, n) = 1 and gcd(d, n) = 1 from [1, 2, ..., n] to itself. - Joerg Arndt, Aug 29 2014
Right border of A127474.
Equals the Mobius transform (A054525) of A029939. - Gary W. Adamson, Aug 20 2008
From Jianing Song, Apr 14 2019: (Start)
a(n) is the number of solutions to gcd(xy, n) = 1 with x, y in [0, n-1].
Let Z_n be the ring of integers modulo n, then a(n) is the number of invertible elements in the ring Z_n[x]/(x^2 - x) (or equivalently, Z_n[x]/(x^2 + x)) with discriminant d = 1 (that is, a(n) is the size of the group G(n) = (Z_n[x]/(x^2 - x))*). Actually, G(n) is isomorphic to (Z_n)* X (Z_n)*. (End)

Examples

			a(5) = 16 since phi(5) = 4.
		

Crossrefs

Similar sequences: A082953 (size of (Z_n[x]/(x^2 - 1))*, d = 4), A002618 ((Z_n[x]/(x^2))*, d = 0), A079458 ((Z_n[x]/(x^2 + 1))*, d = -4), A319445 ((Z_n[x]/(x^2 - x + 1))* or (Z_n[x]/(x^2 + x + 1))*, d = -3).

Programs

Formula

a(n) = A000010(n)^2.
Multiplicative with a(p^e) = (p-1)^2*p^(2e-2), e >= 1. Dirichlet g.f. zeta(s-2)*Product_{primes p} (1 - 2/p^(s-1) + 1/p^s). - R. J. Mathar, Apr 04 2011
Sum_{k>=1} 1/a(k) = A109695. - Vaclav Kotesovec, Sep 20 2020
Sum_{k>=1} (-1)^k/a(k) = (1/7) * A109695. - Amiram Eldar, Nov 11 2020
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime}(1 - (2*p-1)/p^3) = A065464 / 3 = 0.142749... . - Amiram Eldar, Oct 25 2022
a(n) = Sum_{d|n} mu(n/d)*phi(n*d). - Ridouane Oudra, Jul 23 2025

A065484 Decimal expansion of Product_{p prime >= 2} (1 + p/((p-1)^2*(p+1))).

Original entry on oeis.org

2, 2, 0, 3, 8, 5, 6, 5, 9, 6, 4, 3, 7, 8, 5, 9, 7, 8, 7, 8, 7, 2, 8, 2, 8, 3, 1, 6, 4, 8, 0, 0, 8, 9, 6, 6, 2, 5, 6, 7, 1, 7, 3, 1, 9, 3, 7, 8, 7, 8, 5, 8, 6, 3, 4, 1, 7, 0, 4, 9, 5, 5, 4, 4, 8, 7, 1, 6, 6, 8, 8, 6, 8, 1, 1, 8, 5, 2, 6, 9, 5, 4, 9, 7, 5, 7, 2, 6, 6, 0, 4, 1, 9, 0, 1, 3, 9, 5, 6
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2001, Aug 09 2010

Keywords

Comments

Decimal expansion of totient constant. - Eric W. Weisstein, Apr 20 2006

Examples

			2.203856596437859787872828316480...
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 500; digits = 99; terms = 500; P[n_] := PrimeZetaP[n];
    LR = Join[{0, 0, 0}, LinearRecurrence[{2, -1, -1, 1}, {3, 4, 5, 3}, terms + 10]]; r[n_Integer] := LR[[n]];  (Pi^2/6)*Exp[NSum[r[n]*P[n - 1]/(n - 1), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits + 10]  ] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Apr 18 2016 *)
  • PARI
    prodeulerrat(1 + p/((p-1)^2*(p+1))) \\ Hugo Pfoertner, Jun 02 2020

Formula

Equals Pi^2 * A065483 / 6.
Also defined as: Sum_{m>=1} 1/(m*A000010(m)). See Weisstein link.
Equals 5 * Sum_{m>=1} (-1)^(m+1)/(m*A000010(m)). - Amiram Eldar, Nov 21 2022

A002619 Number of 2-colored patterns on an n X n board.

Original entry on oeis.org

1, 1, 2, 3, 8, 24, 108, 640, 4492, 36336, 329900, 3326788, 36846288, 444790512, 5811886656, 81729688428, 1230752346368, 19760413251956, 336967037143596, 6082255029733168, 115852476579940152, 2322315553428424200, 48869596859895986108
Offset: 1

Views

Author

Keywords

Comments

Also number of orbits in the set of circular permutations (up to rotation) under cyclic permutation of the elements. - Michael Steyer, Oct 06 2001
Moser shows that (1/n^2)*Sum_{d|n} k^d*phi(n/d)^2*(n/d)^d*d! is an integer. Here we have k=1. - Michel Marcus, Nov 02 2012

Examples

			n=6: {(123456)}, {(135462), (246513), (351624)} and {(124635), (235146), (346251), (451362), (562413), (613524)} are 3 of the 24 orbits, consisting of 1, 3 and 6 permutations, respectively.
		

References

  • 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).
  • J. E. A. Steggall, On the numbers of patterns which can be derived from certain elements, Mess. Math., 37 (1907), 56-61.
  • K. Yordzhev, On the cardinality of a factor set in the symmetric group. Asian-European Journal of Mathematics, Vol. 7, No. 2 (2014) 1450027, doi: 10.1142/S1793557114500272, ISSN:1793-5571, E-ISSN:1793-7183, Zbl 1298.05035.

Crossrefs

Cf. A000010.
Cf. A000939, A000940, A089066, A262480, A275527 (other classes of permutations under various symmetries).

Programs

  • Maple
    with(numtheory): a:=proc(n) local div: div:=divisors(n): sum(phi(div[j])^2*(n/div[j])!*div[j]^(n/div[j]),j=1..tau(n))/n^2 end: seq(a(n),n=1..23); # Emeric Deutsch, Aug 23 2005
  • Mathematica
    a[n_] := EulerPhi[#]^2*(n/#)!*#^(n/#)/n^2 & /@ Divisors[n] // Total; a /@ Range[23] (* Jean-François Alcover, Jul 11 2011, after Emeric Deutsch *)
  • PARI
    a(n)={sumdiv(n, d, eulerphi(n/d)^2*d!*(n/d)^d)/n^2} \\ Andrew Howroyd, Sep 09 2018
    
  • Python
    from sympy import totient, factorial, divisors
    def A002619(n): return sum(totient(m:=n//d)**2*factorial(d)*m**d for d in divisors(n,generator=True))//n**2 # Chai Wah Wu, Nov 07 2022

Formula

a(n) = Sum_{k|n} u(n, k)/(nk), where u(n, k) = A047918(n, k).
a(n) = (1/n^2)*Sum_{d|n} phi(d)^2*(n/d)!*d^(n/d), where phi is Euler's totient function (A000010). - Emeric Deutsch, Aug 23 2005
From Richard L. Ollerton, May 09 2021: (Start)
Let A(n,k) = (1/n^2)*Sum_{d|n} k^d*phi(n/d)^2*(n/d)^d*d!, then:
A(n,k) = (1/n^2)*Sum_{i=1..n} k^gcd(n,i)*phi(n/gcd(n,i))*(n/gcd(n,i))^gcd(n,i)*gcd(n,i)!.
A(n,k) = (1/n^2)*Sum_{i=1..n} k^(n/gcd(n,i))*phi(gcd(n,i))^2*(gcd(n,i))^(n/gcd(n,i))*(n/gcd(n,i))!.
a(n) = A(n,1). (End)
Showing 1-10 of 113 results. Next