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

A020492 Balanced numbers: numbers k such that phi(k) (A000010) divides sigma(k) (A000203).

Original entry on oeis.org

1, 2, 3, 6, 12, 14, 15, 30, 35, 42, 56, 70, 78, 105, 140, 168, 190, 210, 248, 264, 270, 357, 418, 420, 570, 594, 616, 630, 714, 744, 812, 840, 910, 1045, 1240, 1254, 1485, 1672, 1848, 2090, 2214, 2376, 2436, 2580, 2730, 2970, 3080, 3135, 3339, 3596, 3720, 3828
Offset: 1

Views

Author

Keywords

Comments

The quotient A020492(n)/A002088(n) = SummatorySigma/SummatoryTotient as n increases seems to approach Pi^4/36 or zeta(2)^2 [~2.705808084277845]. - Labos Elemer, Sep 20 2004, corrected by Charles R Greathouse IV, Jun 20 2012
If 2^p-1 is prime (a Mersenne prime) then m = 2^(p-2)*(2^p-1) is in the sequence because when p = 2 we get m = 3 and phi(3) divides sigma(3) and for p > 2, phi(m) = 2^(p-2)*(2^(p-1)-1); sigma(m) = (2^(p-1)-1)*2^p hence sigma(m)/phi(m) = 4 is an integer. So for each n, A133028(n) = 2^(A000043(n)-2)*(2^A000043(n)-1) is in the sequence. - Farideh Firoozbakht, Nov 28 2005
Phi and sigma are both multiplicative functions and for this reason if m and n are coprime and included in this sequence then m*n is also in this sequence. - Enrique Pérez Herrero, Sep 05 2010
The quotients sigma(n)/phi(n) are in A023897. - Bernard Schott, Jun 06 2017
There are 544768 balanced numbers < 10^14. - Jud McCranie, Sep 10 2017
a(975807) = 419998185095132. - Jud McCranie, Nov 28 2017

Examples

			sigma(35) = 1+5+7+35 = 48, phi(35) = 24, hence 35 is a term.
		

References

  • D. Chiang, "N's for which phi(N) divides sigma(N)", Mathematical Buds, Chap. VI pp. 53-70 Vol. 3 Ed. H. D. Ruderman, Mu Alpha Theta 1984.

Crossrefs

Positions of 0's in A063514.

Programs

  • Magma
    [ n: n in [1..3900] | SumOfDivisors(n) mod EulerPhi(n) eq 0 ]; // Klaus Brockhaus, Nov 09 2008
    
  • Mathematica
    Select[ Range[ 4000 ], IntegerQ[ DivisorSigma[ 1, # ]/EulerPhi[ # ] ]& ]
    (* Second program: *)
    Select[Range@ 4000, Divisible[DivisorSigma[1, #], EulerPhi@ #] &] (* Michael De Vlieger, Nov 28 2017 *)
  • PARI
    select(n->sigma(n)%eulerphi(n)==0,vector(10^4,i,i)) \\ Charles R Greathouse IV, Jun 20 2012
    
  • Python
    from sympy import totient, divisor_sigma
    print([n for n in range(1, 4001) if divisor_sigma(n)%totient(n)==0]) # Indranil Ghosh, Jul 06 2017
    
  • Python
    from math import prod
    from itertools import count, islice
    from sympy import factorint
    def A020492_gen(startvalue=1): # generator of terms >= startvalue
        for m in count(max(startvalue,1)):
            f = factorint(m)
            if not prod(p**(e+2)-p for p,e in f.items())%(m*prod((p-1)**2 for p in f)):
                yield m
    A020492_list = list(islice(A020492_gen(),20)) # Chai Wah Wu, Aug 12 2024

Extensions

More terms from Farideh Firoozbakht, Nov 28 2005

A055234 Smallest x such that sigma(x) = n*phi(x), or -1 if no such x exists.

Original entry on oeis.org

1, 3, 2, 14, 56, 6, 12, 42, 30, 168, 2580, 210, 630, 420, 840, 20790, 416640, 9240, 291060, 83160, 120120, 5165160, 1719277560, 43825320, 26860680, 277560360, 1304863560, 569729160, 587133466920, 16522145640, 33044291280, 563462139240, 1140028049160, 9015394227840, 1255683068640, 65361608151840
Offset: 1

Views

Author

Jud McCranie, Jun 21 2000

Keywords

Comments

Conjecture: For each n, a(n) > 0. - Farideh Firoozbakht, Sep 12 2004
a(33) > 10^12. - Donovan Johnson, Mar 06 2012
a(34) <= 9015394227840, a(35) <= 1255683068640. - Giovanni Resta, May 08 2017
Terms after a(36) are > 10^14. a(37) <= 4771397395084320, a(38) <= 2418379501618080, a(39) <= 413956851628320, a(40) <= 1241870554884960, and a(42) <= 50916692750283360. - Jud McCranie, Sep 13 2017
a(38) = 299761858075680, a(39) = 413956851628320. a(37), a(40), and higher terms are > 4.2*10^14. - Jud McCranie, Nov 27 2017
a(37), a(40), and higher terms are > 6.0 x 10^14. - Jud McCranie, Dec 27 2017

Examples

			sigma(14) = 24 = 4*phi(14), so a(4) = 14.
n = 21: a(21) = 120120 = 2*2*2*3*5*7*11*13, sigma(120120) = 483840 = n*phi(120120), phi(120120) = 23040.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(For[m=1,DivisorSigma[1,m]!=n EulerPhi[m],m++ ];m);Do[Print[a[n]], {n,31}] (* Farideh Firoozbakht, Oct 31 2008 *)
  • PARI
    a(n) = {k = 1; while(sigma(k) != n*eulerphi(k), k++); k;} \\ Michel Marcus, Sep 01 2014
    
  • Python
    from math import prod
    from itertools import count
    from sympy import factorint
    def A055234(n):
        for m in count(1):
            f = factorint(m)
            if n*m*prod((p-1)**2 for p in f)==prod(p**(e+2)-p for p,e in f.items()):
                return m # Chai Wah Wu, Aug 12 2024

Formula

a(n) = Min{x : A000203(x)/A000010(x) = n} = Min{x : A023897(x) = n}

Extensions

More terms from Farideh Firoozbakht, Sep 12 2004
a(32) from Donovan Johnson, Mar 06 2012
a(33) from Giovanni Resta, May 08 2017
a(34)-a(36) from Jud McCranie, Sep 10 2017

A063514 a(n) = sigma(n) mod phi(n).

Original entry on oeis.org

0, 0, 0, 1, 2, 0, 2, 3, 1, 2, 2, 0, 2, 0, 0, 7, 2, 3, 2, 2, 8, 6, 2, 4, 11, 6, 4, 8, 2, 0, 2, 15, 8, 6, 0, 7, 2, 6, 8, 10, 2, 0, 2, 4, 6, 6, 2, 12, 15, 13, 8, 2, 2, 12, 32, 0, 8, 6, 2, 8, 2, 6, 32, 31, 36, 4, 2, 30, 8, 0, 2, 3, 2, 6, 4, 32, 36, 0, 2, 26, 13, 6, 2
Offset: 1

Views

Author

Labos Elemer, Jul 31 2001

Keywords

Comments

If a(n) = 0, then n is a balanced number (A020492).

Crossrefs

Programs

  • Magma
    [SumOfDivisors(n) mod EulerPhi(n): n in [1..85]]; // Bruno Berselli, Jan 31 2013
  • Mathematica
    a[n_] := Mod[DivisorSigma[1, n], EulerPhi[n]]; Array[a, 100] (* Amiram Eldar, Dec 25 2024 *)
  • PARI
    a(n) = { sigma(n)%eulerphi(n) } \\ Harry J. Smith, Aug 24 2009
    

Formula

a(p^2) = 2*p+1, for prime p >= 5. - Michel Marcus, Apr 07 2020

A351112 Number of balanced numbers dividing n.

Original entry on oeis.org

1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 5, 1, 3, 3, 2, 1, 4, 1, 2, 2, 2, 1, 5, 1, 2, 2, 3, 1, 6, 1, 2, 2, 2, 2, 5, 1, 2, 2, 2, 1, 6, 1, 2, 3, 2, 1, 5, 1, 2, 2, 2, 1, 4, 1, 4, 2, 2, 1, 7, 1, 2, 2, 2, 1, 4, 1, 2, 2, 5, 1, 5, 1, 2, 3, 2, 1, 5, 1, 2, 2, 2, 1, 7, 1, 2, 2, 2, 1, 6, 1, 2
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 31 2022

Keywords

Comments

A balanced number k is a number such that phi(k) | sigma(k).
Inverse Möbius transform of the characteristic function of balanced numbers (A351114). - Wesley Ivan Hurt, Jun 23 2024

Examples

			a(4) = 2; the balanced divisors of 4 are 1 and 2.
a(5) = 1; 1 is the only balanced divisor of 5.
a(6) = 4; the balanced divisors of 6 are 1,2,3,6.
		

Crossrefs

Cf. A351113 (sum of the balanced numbers dividing n).
Cf. A000005 (tau), A000010 (phi), A000203 (sigma), A020492 (balanced numbers), A023897, A351114.

Programs

  • Maple
    f:= proc(n) uses numtheory;
      nops(select(t -> sigma(t) mod phi(t) = 0, divisors(n)))
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 28 2023
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[DivisorSigma[1, #], EulerPhi[#]] &]; Array[a, 100] (* Amiram Eldar, Feb 01 2022 *)
  • PARI
    a(n) = sumdiv(n, d, if (!(sigma(d) % eulerphi(d)), 1)); \\ Michel Marcus, Feb 01 2022

Formula

a(n) = Sum_{d|n, phi(d)|sigma(d)} 1.
a(n) = Sum_{d|n} A351114(d).
a(n) = tau(n) - Sum_{d|n} sign(sigma(d) mod phi(d)).
Conjecture: asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A020492(k) = 2.4343... (assuming empirically that this sum of reciprocals converges). - Amiram Eldar, Dec 27 2024

A073815 Least number x such that gcd(phi(x), sigma(x)) = n.

Original entry on oeis.org

1, 3, 18, 12, 200, 14, 3364, 15, 722, 328, 9801, 42, 25281, 116, 1800, 165, 36992, 810, 4414201, 88, 196, 29161, 541696, 35, 2928200, 1413, 103968, 172, 98942809, 488, 1547536, 336, 19602, 17536, 814088, 370, 49042009, 55297, 1521, 319, 3150464641
Offset: 1

Views

Author

Labos Elemer, Nov 12 2002

Keywords

Comments

Values are frequently identical to terms of A077102. Since gcd(a,b) and gcd(a+b,a-b) may differ, so may the smallest solutions. A077102(m) and a(m) differ at m = 1, 2, 4, 8, 16, 28, 32, 40, etc.

Crossrefs

Programs

  • Mathematica
    f[x_] := Apply[GCD, {DivisorSigma[1, x], EulerPhi[x]}] t=Table[0, {100}]; Do[s=f[n]; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 10^13}];
  • PARI
    a(n)=my(x=n);while(gcd(eulerphi(x),sigma(x))!=n, x++); x \\ Charles R Greathouse IV, Dec 09 2013

Formula

a(n) = Min{x; A055008(x)=n}. a(n)=Min{x; gcd(A000203(x), A000010(x))=n}
a(n) = Min{x: A023897(x)= n}, smallest balanced number (A020492) for which the quotient equals n.

A289336 a(n) = numerator of (sigma(n) / phi(n)).

Original entry on oeis.org

1, 3, 2, 7, 3, 6, 4, 15, 13, 9, 6, 7, 7, 4, 3, 31, 9, 13, 10, 21, 8, 18, 12, 15, 31, 7, 20, 14, 15, 9, 16, 63, 12, 27, 2, 91, 19, 10, 7, 45, 21, 8, 22, 21, 13, 36, 24, 31, 19, 93, 9, 49, 27, 20, 9, 5, 20, 45, 30, 21, 31, 16, 26, 127, 7, 36, 34, 63, 24, 6, 36
Offset: 1

Views

Author

Jaroslav Krizek, Aug 19 2017

Keywords

Examples

			Fractions begin with: 1, 3, 2, 7/2, 3/2, 6, 4/3, 15/4, 13/6, 9/2, 6/5, 7, ...
For n = 7, sigma(7) / phi(7) = 8/6 = 4/3, a(7) = 4.
		

Crossrefs

Programs

  • Magma
    [Numerator(SumOfDivisors(n) / EulerPhi(n)): n in[1..1000]]
    
  • Mathematica
    Array[Numerator[DivisorSigma[1, #]/EulerPhi[#]] &, 71] (* Michael De Vlieger, Aug 19 2017 *)
  • PARI
    a(n) = numerator(sigma(n)/eulerphi(n)); \\ Michel Marcus, Aug 21 2017

Formula

a(n) = numerator of (A000203(n) / A000010(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A289412(k) = (Pi^4/36) * Product_{p prime} (1 + 2/p^3 - 1/p^5) = 3.6174451656... . - Amiram Eldar, Nov 21 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} A289412(k)/a(k) = Product_{p prime} (1 - 3/(p*(p + 1)) + 1/(p^2*(p + 1)) + ((p-1)^3/p^2)*Sum_{k>=3} 1/(p^k-1)) = 0.45782563109026414241... (De Koninck and Luca, 2007). - Amiram Eldar, Feb 27 2024

A289412 a(n) = denominator of (sigma(n) / phi(n)).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 4, 6, 2, 5, 1, 6, 1, 1, 8, 8, 2, 9, 4, 3, 5, 11, 2, 20, 2, 9, 3, 14, 1, 15, 16, 5, 8, 1, 12, 18, 3, 3, 8, 20, 1, 21, 5, 4, 11, 23, 4, 14, 20, 4, 12, 26, 3, 5, 1, 9, 14, 29, 2, 30, 5, 9, 32, 4, 5, 33, 16, 11, 1, 35, 8, 36, 6, 10, 9, 5, 1
Offset: 1

Views

Author

Jaroslav Krizek, Aug 19 2017

Keywords

Comments

a(n) = 1 for numbers in A020492 (balanced numbers).

Examples

			For n = 7, sigma(7) / phi(7) = 8/6 = 4/3, a(n) = 3.
		

Crossrefs

Programs

  • Magma
    [Denominator(SumOfDivisors(n) / EulerPhi(n)): n in[1..1000]]
    
  • Mathematica
    Array[Denominator[DivisorSigma[1, #]/EulerPhi[#]] &, 78] (* Michael De Vlieger, Aug 19 2017 *)
  • PARI
    a(n) = denominator(sigma(n)/eulerphi(n)); \\ Michel Marcus, Aug 21 2017

Formula

a(n) = denominator of (A000203(n) / A000010(n)).

A342103 Balanced numbers (A020492) that are also arithmetic numbers (A003601).

Original entry on oeis.org

1, 3, 6, 14, 15, 30, 35, 42, 56, 70, 78, 105, 140, 168, 190, 210, 248, 264, 270, 357, 418, 420, 570, 594, 616, 630, 714, 744, 812, 840, 910, 1045, 1240, 1254, 1485, 1672, 1848, 2090, 2214, 2376, 2436, 2580, 2730, 2970, 3080, 3135, 3339, 3596, 3720, 3828, 3956, 4064, 4180
Offset: 1

Views

Author

Bernard Schott, Feb 28 2021

Keywords

Comments

Equivalently, numbers m such that phi(m) (A000010) and tau(m) (A000005) both divide sigma(m) (A000203). In this case, the quotients sigma(m)/phi(m) = A023897(m) and sigma(m)/tau(m) = A102187(m).
Phi, tau and sigma are multiplicative functions and for this reason if k and q are coprime and included in this sequence then k*q is another term.
The only prime in the sequence is 3, because sigma(2)/tau(2) = 3/2 and when p is an odd prime, sigma(p)/phi(p) = (p+1)/(p-1) is an integer iff p=3 with sigma(3)/phi(3) = 4/2 = 2, and also sigma(3)/tau(3) = 4/2 = 2.

Examples

			phi(30) = tau(30) = 8, sigma(30) = 72 and 72/8 = 9, hence 30 is a term.
phi(12) = 4, tau(12) = 6, sigma(12) = 28, phi(12) divides sigma(12), but tau(12) does not divide sigma(12), hence 12 is a balanced number but is not an arithmetic number, and 12 is not a term.
phi(20) = 8, tau(20) = 6, sigma(20) = 42, tau(20) divides sigma(20), but phi(20) does not divide sigma(20), hence 20 is an arithmetic number but is not a balanced number, and 20 is not a term.
		

Crossrefs

Intersection of A003601 and A020492.
Cf. A000005 (tau), A000010 (phi), A000203 (sigma), A023897 (sigma/phi), A102187 (sigma/tau).

Programs

  • Maple
    with(numtheory): filter:= q -> (sigma(q) mod phi(q) = 0) and (sigma(q) mod tau(q) = 0) : select(filter, [$1..5000]);
  • Mathematica
    Select[Range[5000], And @@ Divisible[DivisorSigma[1, #], {DivisorSigma[0, #], EulerPhi[#]}] &] (* Amiram Eldar, Feb 28 2021 *)
  • PARI
    isok(m) = my(s=sigma(m)); !(s % eulerphi(m)) && !(s % numdiv(m)); \\ Michel Marcus, Mar 01 2021

A351113 Sum of the balanced numbers dividing n.

Original entry on oeis.org

1, 3, 4, 3, 1, 12, 1, 3, 4, 3, 1, 24, 1, 17, 19, 3, 1, 12, 1, 3, 4, 3, 1, 24, 1, 3, 4, 17, 1, 57, 1, 3, 4, 3, 36, 24, 1, 3, 4, 3, 1, 68, 1, 3, 19, 3, 1, 24, 1, 3, 4, 3, 1, 12, 1, 73, 4, 3, 1, 69, 1, 3, 4, 3, 1, 12, 1, 3, 4, 122, 1, 24, 1, 3, 19, 3, 1, 90, 1, 3, 4, 3, 1, 80
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 31 2022

Keywords

Comments

A balanced number k is a number such that phi(k) | sigma(k).

Examples

			a(4) = 3; the balanced divisors of 4 are 1 and 2 and 1+2 = 3.
a(5) = 1; 1 is the only balanced divisor of 5.
a(6) = 12; the balanced divisors of 6 are 1,2,3,6 and 1+2+3+6 = 12.
		

Crossrefs

Cf. A351112 (number of balanced divisors of n).
Cf. A000005 (tau), A000010 (phi), A000203 (sigma), A020492 (balanced numbers), A023897, A351114.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, # &, Divisible[DivisorSigma[1, #], EulerPhi[#]] &]; Array[a, 100] (* Amiram Eldar, Feb 01 2022 *)
  • PARI
    a(n) = sumdiv(n, d, if (!(sigma(d) % eulerphi(d)), d)); \\ Michel Marcus, Feb 01 2022

Formula

a(n) = Sum_{d|n, phi(d)|sigma(d)} d.
a(n) = Sum_{d|n} d * A351114(d).
a(n) = sigma(n) - Sum_{d|n} d * sign(sigma(d) mod phi(d)).

A342104 Balanced numbers (A020492) that are not arithmetic numbers (A003601).

Original entry on oeis.org

2, 12, 18630, 27000, 443394, 6242022, 14412720, 22315419, 26744100, 44630838, 50496960, 106034880, 128710944, 148536990, 162907584, 212072880, 218470770, 296259930, 349444530, 397253968, 535267776, 641250900, 641418960, 666274653, 684165552, 688208724, 709639408
Offset: 1

Views

Author

Bernard Schott, Feb 28 2021

Keywords

Comments

Equivalently, numbers m such that phi(m) divides sigma(m) but tau(m) does not divide sigma(m), the corresponding quotients sigma(m)/phi(m) = A023897(m).
The only prime in the sequence is 2, because sigma(2)/phi(2) = 3 and sigma(2)/tau(2) = 3/2; then, if p odd prime, sigma(p)/phi(p) = (p+1)/(p-1) is an integer iff p = 3, but for p = 3, tau(3) divides sigma(3) with sigma(3)/tau(3) = 4/2 = 2.

Examples

			Sigma(12) = 28, phi(12) = 4 and tau(12) = 6, hence phi(12) divides sigma(12), but tau(12) does not divide sigma(12), so 12 is a term.
		

Crossrefs

Equals A020492 \ A003601.
Cf. A000005 (tau), A000010 (phi), A000203 (sigma), A023897 (sigma/phi).

Programs

  • Maple
    with(numtheory): filter:= q -> (sigma(q) mod phi(q) = 0) and (sigma(q) mod tau(q) <> 0) : select(filter, [$1..500000]);
  • Mathematica
    Select[Range[500000], Divisible[DivisorSigma[1, #], {DivisorSigma[0, #], EulerPhi[#]}] == {False, True} &] (* Amiram Eldar, Feb 28 2021 *)
  • PARI
    isok(m) = my(s=sigma(m)); !(s % eulerphi(m)) && (s % numdiv(m)); \\ Michel Marcus, Mar 01 2021

Extensions

a(5)-a(27) from Amiram Eldar, Feb 28 2021
Showing 1-10 of 13 results. Next