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

A163109 a(n) = phi(tau(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 1, 2, 2, 2, 2, 6, 1, 2, 2, 4, 1, 4, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 2, 4, 2, 2, 1, 4, 1, 2, 2, 6, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 2, 2, 2, 4, 1, 4, 4, 2, 1, 4, 2, 2, 2, 4, 1, 4, 2, 2, 2, 2, 2, 4, 1, 2, 2, 6, 1, 4, 1, 4, 4
Offset: 1

Views

Author

Jaroslav Krizek, Jul 20 2009

Keywords

Examples

			a(16) = a(2^(5-1)) = 5-1 = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[EulerPhi[DivisorSigma[0, n]], {n, 1, 80}] (* Carl Najafi, Aug 15 2011 *)
  • PARI
    a(n) = eulerphi(numdiv(n)); \\ Michel Marcus, Aug 22 2015

Formula

a(n) = A000010(A000005(n)). - Charles R Greathouse IV, Aug 11 2009
a(1) = 1, a(p) = 1 for p = primes (A000040), a(p*q) = 2 for p*q = product of two distinct primes (A006881), a(p*q*...*z) = 2^(k-1) for p*q*...*z = product of k (k > 2) distinct primes p, q, ..., z (A120944), a(p^(q-1)) = q - 1 for p, q = primes (A000040).

Extensions

More terms from Carl Najafi, Aug 15 2011
Further extended by Antti Karttunen, Jul 23 2017

A116518 Odd numbers k such that k and phi(k) have the same number of divisors.

Original entry on oeis.org

1, 3, 15, 255, 65535, 77805, 161595, 331695, 575025, 664335, 765765, 1601145, 2250885, 2380833, 2690415, 3271905, 3828825, 4107285, 5181813, 5778045, 5871285, 6007365, 6613425, 7448805, 9258795, 9787869, 9935055, 10503675, 10554705, 10724805, 11060595
Offset: 1

Views

Author

Max Alekseyev, Mar 24 2006

Keywords

Comments

From Farideh Firoozbakht, Aug 28 2006: (Start)
For n < 6, the product of the first n Fermat primes is in the sequence because if m = 2^(2^n)-1 and n < 6 then d(m) = d(phi(m)) = 2^n.
(1). If p is a Sophie Germain prime greater than 3 then m = 69615*(2p+1) (A005385) is in the sequence because d(m) = d(phi(m)) = 96. 765765, 1601145, 3271905, 4107285, 5778045, 7448805, ... is the related subsequence.
(2). If p is a prime greater than 3 such that 4p+1 is prime then m = 700245*(4p+1) (A090866) is in the sequence because d(m) = d(phi(m)) = 160. 20307105, 37112985, 104336505, 121142385, ... is the related subsequence. (End)
It is an open question whether this sequence contains infinitely many terms; see Bellaouar et al., 2023. - Allen Stenger, Feb 16 2024

Crossrefs

Subsequence of A070418. Cf. A005384.

Programs

  • Mathematica
    Select[Range[1,10510001,2],DivisorSigma[0,#]==DivisorSigma[ 0, EulerPhi[#]]&] (* Harvey P. Dale, Jan 30 2013 *)
  • PARI
    forstep(n=1,10^8,2,if(numdiv(n)==numdiv(eulerphi(n)),print1(n,", ")))

A193386 Number of even divisors of phi(n).

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Jul 25 2011

Keywords

Examples

			a(13) = 4 because phi(13) = 12 and the 4 even divisors are { 2, 4, 6, 12}.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors[EulerPhi[n]]}, Count[EvenQ[d], True]]; Table[f[n], {n, 80}]
    (* Second program: *)
    Array[DivisorSum[EulerPhi@ #, 1 &, EvenQ] &, 105] (* Michael De Vlieger, Dec 04 2017 *)
  • PARI
    A193386(n) = sumdiv(eulerphi(n), d, 1-(d%2)); \\ Antti Karttunen, Dec 04 2017

Formula

a(n) = A183063(A000010(n)) = A062821(n) - A193453(n). - Antti Karttunen, Dec 04 2017

Extensions

More terms from Antti Karttunen, Dec 04 2017

A276044 Least k such that phi(k) has exactly n divisors.

Original entry on oeis.org

1, 3, 5, 7, 17, 13, 85, 31, 37, 65, 1285, 61, 4369, 193, 185, 143, 65537, 181, 327685, 241, 577, 3281, 5570645, 403, 1297, 12289, 1057, 1037, 286331153, 779, 1431655765, 899, 9509, 197633, 5629, 1333, 137438953472, 786433, 42653, 1763, 2199023255552, 2993, 8796093022208, 15361, 3737, 12648641
Offset: 1

Views

Author

Altug Alkan, Aug 17 2016

Keywords

Comments

Least k such that A000005(A000010(k)) = n.
From Jon E. Schoenfield, Nov 13 2016: (Start)
For every n > 0, phi(2^n) = 2^(n-1) has exactly n divisors, so a(n) <= 2^n.
For every prime p, since phi(a(p)) has exactly p divisors, phi(a(p)) must be of the form q^(p-1), where q is a prime number. If q >= 3, we would have phi(a(p)) >= 3^(p-1), and since k > phi(k) for every k > 1, we would have a(p) >= 3^(p-1)+1, which would be contradicted by the upper bound a(p) <= 2^p (see above) unless 3^(p-1)+1 <= 2^p, which is true only for p = 2. Thus, for every prime p > 2, phi(a(p)) = 2^(p-1), so a(p) > 2^(p-1). In summary, we can state that, for every prime p > 2:
(1) a(p) is the least k such that phi(k) = 2^(p-1), and
(2) 2^(p-1) < a(p) <= 2^p.
After a(36)=1333, the next few known terms are a(38)=786433, a(39)=42653, a(40)=1763, and a(42)=2993; as shown above, known bounds on a(37) and a(41) are 2^36 < a(37) <= 2^37 and 2^40 < a(41) <= 2^41.
For prime p < 37, a(p) = A001317(p-1).
Observation: for prime p < 37, a(p) is the product of distinct Fermat primes 2^(2^j)+1 for j=0..4, i.e., 3, 5, 17, 257, and 65537 (see A019434), according to the locations of the 1-bits in p-1:
. p-1 in
p a(p) prime factorization of a(p) binary
== ========== =========================== ======
2 3 = 3 1
3 5 = 5 10
5 17 = 17 100
7 85 = 17 * 5 110
11 1285 = 257 * 5 1010
13 4369 = 257 * 17 1100
17 65537 = 65537 10000
19 327685 = 65537 * 5 10010
23 5570645 = 65537 * 17 * 5 10110
29 286331153 = 65537 * 257 * 17 11100
31 1431655765 = 65537 * 257 * 17 * 5 11110
.
This pattern does not continue to p=37, since 2^(2^5)+1 is not prime. (See also A038183 and the observation there from Arkadiusz Wesolowski.) (End)
As noted, for every prime p, phi(a(p))=2^(p-1), decompose a(p) = p_1^(e_1) *...* p_m^(e_m), then phi(a(p)) = p_1^(e_1-1)*(p_1 - 1) * ... * p_m^(e_m-1)*(p_m - 1). Thus a(p) is of the form 2^e * F_(a_1) *...* F_(a_l), where F_(a_i) = 2^(a_i) + 1 denote distinct Fermat primes. If e = 0, a_1 + ... + a_l = p - 1, while if e > 0, e + a_1 + ... + a_l = p. It can be deduced that a(p) = 2^p unless p-1 can be written as a_1 + ... a_l where 2^(a_i) + 1 are distinct Fermat primes. The only Fermat primes known have a_i in {1,2,4,8,16} and it is known that 2^a + 1 is composite for 16 < a < 2^33 (cf. A019434). It follows from the fact that 1 + 2 + 4 + 8 + 16 = 31 that a(p) = 2^p for primes p with 32 < p <= 2^33. - Pjotr Buys, Sep 18 2019

Examples

			a(5) = 17 because phi(17) = 16 has 5 positive divisors.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[DivisorSigma[0, #] &@ EulerPhi@ k != n, k++]; k, {n, 28}] (* Michael De Vlieger, Aug 21 2016 *)
  • PARI
    a(n) = {my(k = 1); while(numdiv(eulerphi(k)) != n, k++); k; }

Formula

a(p) = 2^p for primes p with 32 < p <= 2^33. - Pjotr Buys, Sep 18 2019

Extensions

a(31)-a(36) from Michel Marcus and Jon E. Schoenfield, Nov 13 2016
a(37)-a(46) from Pjotr Buys, Sep 18 2019

A385122 a(n) = d(phi(n)) - phi(d(n)) where d(n) = A000005(n) is the number of divisors and phi(n) = A000010(n) is the Euler totient function.

Original entry on oeis.org

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

Views

Author

Sean A. Irvine, Jun 18 2025

Keywords

Comments

First negative value is a(120) = -2.

Crossrefs

Programs

  • Mathematica
    A385122[n_] := DivisorSigma[0, EulerPhi[n]] - EulerPhi[DivisorSigma[0, n]];
    Array[A385122, 100] (* Paolo Xausa, Jun 19 2025 *)
  • PARI
    a(n) = numdiv(eulerphi(n)) - eulerphi(numdiv(n)); \\ Michel Marcus, Jun 19 2025

Formula

a(n) = A000005(A000010(n)) - A000010(A000005(n)).
a(n) = A062821(n) - A163109(n).

A163375 a(n) = sigma(tau(phi(n))).

Original entry on oeis.org

1, 1, 3, 3, 4, 3, 7, 4, 7, 4, 7, 4, 12, 7, 7, 7, 6, 7, 12, 7, 12, 7, 7, 7, 12, 12, 12, 12, 12, 7, 15, 6, 12, 6, 15, 12, 13, 12, 15, 6, 15, 12, 15, 12, 15, 7, 7, 6, 15, 12, 12, 15, 12, 12, 15, 15, 13, 12, 7, 6, 28, 15, 13, 12, 18, 12, 15, 12, 12, 15, 15, 15
Offset: 1

Views

Author

Jaroslav Krizek, Jul 25 2009

Keywords

Crossrefs

Programs

  • Magma
    [SumOfDivisors(NumberOfDivisors(EulerPhi(n))): n in [1..80]]; // Vincenzo Librandi, Dec 20 2016
  • Mathematica
    DivisorSigma[1, DivisorSigma[0, EulerPhi[Range[100]]]] (* G. C. Greubel, Dec 20 2016 *)
  • PARI
    vector(100, n, sigma(numdiv(eulerphi(n)))) \\ G. C. Greubel, Dec 20 2016
    

Formula

A163377 a(n) = tau(phi(tau(n))).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 4, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 3, 2, 2, 1, 3, 1, 2, 2, 4, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 3, 2, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 3
Offset: 1

Views

Author

Jaroslav Krizek, Jul 25 2009

Keywords

Crossrefs

Programs

  • Mathematica
    DivisorSigma[0, EulerPhi[DivisorSigma[0, Range[100]]]] (* G. C. Greubel, Dec 20 2016 *)
  • PARI
    vector(100, n, numdiv(eulerphi(numdiv(n)))) \\ G. C. Greubel, Dec 20 2016

Formula

A173327 Numbers k such that tau(phi(k))= sopf(k).

Original entry on oeis.org

4, 45, 48, 75, 160, 180, 252, 294, 300, 315, 336, 351, 378, 396, 475, 507, 560, 605, 616, 650, 833, 936, 1216, 1375, 1452, 1690, 1805, 1920, 2023, 2112, 2200, 2349, 2496, 2736, 3211, 3520, 3648, 4095, 4160, 4256, 4332, 4389, 4464, 4477, 4508, 4620, 4693
Offset: 1

Views

Author

Michel Lagneau, Feb 16 2010

Keywords

Comments

tau(k) is the number of divisors of k (A000005); phi(k) is the Euler totient function (A000010); and sopf(k) is the sum of the distinct primes dividing k without repetition (A008472).

Examples

			4 is in the sequence because phi(4) = 2, tau(2)=2 and sopf(4)=2 ;
45 is in the sequence because phi(45) = 24, tau(24)=8 and sopf(45)=8.
		

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.

Crossrefs

Programs

  • Magma
    [ m:m in [2..5100]|#Divisors(EulerPhi(m)) eq &+PrimeDivisors(m)]; // Marius A. Burtea, Jul 10 2019
  • Maple
    for n from 1 to 150000 do : t1:= ifactors(n)[2] : t2 :=sum(t1[i][1], i=1..nops(t1)):if tau(phi(n)) = t2 then print (n): else fi : od :
  • Mathematica
    tpsQ[n_]:=DivisorSigma[0,EulerPhi[n]]==Total[Transpose[FactorInteger[n]][[1]]]; Select[Range[5000],tpsQ] (* Harvey P. Dale, Apr 10 2013 *)
  • PARI
    sopf(n)=my(f=factor(n)[1,]);sum(i=1,#f,f[i])
    is(n)=numdiv(eulerphi(n))==sopf(n) \\ Charles R Greathouse IV, May 20 2013
    

Formula

Numbers n such that A062821(n)= A008472(n)

Extensions

Added punctuation to the examples. Corrected and edited by Michel Lagneau, Apr 25 2010
Edited by D. S. McNeil, Nov 20 2010

A062823 Numbers k such that the number of divisors of k divides the number of divisors of the totient of k.

Original entry on oeis.org

1, 3, 7, 11, 13, 14, 15, 19, 22, 23, 25, 28, 29, 31, 35, 39, 41, 43, 44, 46, 47, 50, 53, 55, 56, 59, 61, 62, 67, 68, 70, 71, 73, 77, 78, 79, 82, 83, 86, 87, 88, 89, 91, 92, 93, 94, 95, 97, 99, 103, 107, 109, 110, 111, 112, 113, 115, 117, 118, 119, 122, 124, 127, 129, 131
Offset: 1

Views

Author

Labos Elemer, Jul 20 2001

Keywords

Examples

			For k = {3,11,29}, phi(k) = {2,10,28}, d(phi(k)) = {2,4,6}, d(k) = 2, quotient = {1,2,3}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 132, Mod @@ DivisorSigma[0, {EulerPhi@ #, #}] == 0 &] (* Michael De Vlieger, Jun 29 2018 *)
  • PARI
    select(m->frac(numdiv(eulerphi(m))/numdiv(m)) == 0, [1..500]) \\ Harry J. Smith, Aug 11 2009
    
  • PARI
    isok(k) = {my(f = factor(k)); !(numdiv(eulerphi(f)) % numdiv(f));} \\ Amiram Eldar, Jan 31 2025

Extensions

Incorrect formula deleted by Jon E. Schoenfield, Jul 02 2018
Offset corrected by Amiram Eldar, Jan 31 2025

A163371 a(n) = tau(phi(sigma(n))).

Original entry on oeis.org

1, 2, 2, 4, 2, 3, 3, 4, 6, 4, 3, 6, 4, 4, 4, 8, 4, 8, 4, 6, 5, 6, 4, 5, 8, 6, 5, 8, 4, 8, 5, 9, 5, 6, 5, 12, 6, 5, 8, 8, 6, 6, 6, 8, 8, 8, 5, 12, 9, 12, 8, 8, 6, 6, 8, 6, 6, 8, 5, 10, 8, 6, 10, 12, 8, 10, 6, 9, 6, 10, 8, 12, 9, 9, 12, 10, 6, 10, 6, 12, 8, 9, 8, 12, 9, 8
Offset: 1

Views

Author

Jaroslav Krizek, Jul 25 2009

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): A163371:=n->tau(phi(sigma(n))): seq(A163371(n), n=1..150); # Wesley Ivan Hurt, Dec 19 2016
  • Mathematica
    DivisorSigma[0, EulerPhi[DivisorSigma[1, Range[100]]]] (* G. C. Greubel, Dec 19 2016 *)
  • PARI
    vector(50, n, numdiv(eulerphi(sigma(n)))) \\ G. C. Greubel, Dec 19 2016

Formula

Showing 1-10 of 22 results. Next