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-6 of 6 results.

A015126 Least k such that phi(k) = phi(n).

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 5, 7, 5, 11, 5, 13, 7, 15, 15, 17, 7, 19, 15, 13, 11, 23, 15, 25, 13, 19, 13, 29, 15, 31, 17, 25, 17, 35, 13, 37, 19, 35, 17, 41, 13, 43, 25, 35, 23, 47, 17, 43, 25, 51, 35, 53, 19, 41, 35, 37, 29, 59, 17, 61, 31, 37, 51, 65, 25, 67, 51, 69, 35, 71, 35, 73
Offset: 1

Views

Author

Vladeta Jovovic, Jan 12 2002

Keywords

Comments

From Jianing Song, Nov 11 2022: (Start)
The first even term is a(33817088) = 16842752 (see A002181 and A143510).
Conjecture: a(n) is always odd for odd n. (End)

Crossrefs

Programs

  • PARI
    a(n) = {my(en = eulerphi(n)); k = 1; while (eulerphi(k) != en, k++); return (k);} \\ Michel Marcus, Jun 17 2013
    
  • PARI
    a(n) = vecmin(select(x -> x<=n, invphi(eulerphi(n)))); \\ Amiram Eldar, Nov 14 2024, using Max Alekseyev's invphi.gp

A028476 Greatest k such that phi(k) = phi(n), where phi is Euler's totient function.

Original entry on oeis.org

2, 2, 6, 6, 12, 6, 18, 12, 18, 12, 22, 12, 42, 18, 30, 30, 60, 18, 54, 30, 42, 22, 46, 30, 66, 42, 54, 42, 58, 30, 62, 60, 66, 60, 90, 42, 126, 54, 90, 60, 150, 42, 98, 66, 90, 46, 94, 60, 98, 66, 120, 90, 106, 54, 150, 90, 126, 58, 118, 60, 198, 62, 126, 120, 210, 66, 134
Offset: 1

Views

Author

Vladeta Jovovic, Jan 12 2002

Keywords

Comments

Every number in this sequence occurs at least twice. For all n > 6, a(n) > phi(n)^2 is impossible. - Alonso del Arte, Dec 31 2016

Examples

			phi(1) = 1 and phi(2) = 1 also. There is no greater k such that phi(k) = 1, so therefore a(1) = a(2) = 2.
phi(3) = phi(4) = phi(6) = 2, and there is no greater k such that phi(k) = 6, hence a(3) = a(4) = a(6) = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[Module[{k = (2 Boole[n <= 6]) + #^2}, While[EulerPhi@ k != #, k--]; k] &@ EulerPhi@ n, {n, 120}] (* Michael De Vlieger, Dec 31 2016 *)
  • PARI
    a(n) = invphiMax(eulerphi(n)); \\ Amiram Eldar, Nov 14 2024, using Max Alekseyev's invphi.gp

Formula

a(1) = a(2) = 2, for n > 2, a(n) = A057826(A000010(n)/2). - Antti Karttunen, Aug 07 2017

A043343 Numbers m such that there is no k > m such that phi(k) = phi(m), where phi is Euler's totient function.

Original entry on oeis.org

2, 6, 12, 18, 22, 30, 42, 46, 54, 58, 60, 62, 66, 90, 94, 98, 106, 118, 120, 126, 134, 138, 142, 150, 158, 162, 166, 174, 198, 206, 210, 214, 240, 242, 250, 254, 262, 270, 274, 276, 278, 282, 294, 298, 302, 318, 330, 334, 346, 348, 354, 358, 378, 382, 394, 398
Offset: 1

Views

Author

Vladeta Jovovic, Jan 12 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten@ Position[#, 0] &@ Table[k = n + 1; While[And[k <= 2 n + 1, EulerPhi@ k != EulerPhi@ n], k++]; Boole[k < 2 n + 1] k, {n, 400}] (* Michael De Vlieger, Dec 31 2016 *)
  • PARI
    is(k) = #select(x -> x>k, invphi(eulerphi(k))) == 0; \\ Amiram Eldar, Nov 12 2024, using Max Alekseyev's invphi.gp

Formula

A066659(a(n)) = 0.
A028476(a(n)) = a(n).

Extensions

Offset corrected by Paul Tek, Sep 25 2015
Definition clarified by Alonso del Arte, Dec 31 2016

A262599 Lexicographically earliest sequence of distinct terms such that, for any n > 0, phi(a(n)) = phi(n) (where phi denotes the Euler totient function), and a(n) > n if possible.

Original entry on oeis.org

2, 1, 4, 6, 8, 3, 9, 10, 14, 12, 22, 5, 21, 18, 16, 20, 32, 7, 27, 24, 26, 11, 46, 30, 33, 28, 38, 36, 58, 15, 62, 34, 44, 40, 39, 42, 57, 54, 45, 48, 55, 13, 49, 50, 52, 23, 94, 60, 86, 66, 64, 56, 106, 19, 75, 70, 63, 29, 118, 17, 77, 31, 74, 68, 104, 25
Offset: 1

Views

Author

Paul Tek, Sep 25 2015

Keywords

Comments

This is a permutation of the positive integers, with inverse A262603.
If the Carmichael's totient function conjecture is true, then this sequence has no fixed point.
For any n > 0, the orbit of n is finite, with length A066412(n).

Examples

			phi(n) = 6 iff n is in { 7, 9, 14, 18 }.
Hence: a(7) = 9, a(9) = 14, a(14) = 18, a(18) = 7.
		

Crossrefs

Cf. A049283, A066412, A066659, A262603 (inverse).

Programs

  • C
    // See Links section for C program.

Formula

a(n) = max(A066659(n), A049283(A000010(n))), for any n > 0.

A272328 Number of integers 1<=k<=n such that phi(n)=phi(n+k) where phi is Euler's totient function A000010.

Original entry on oeis.org

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

Views

Author

Tom Edgar, Apr 25 2016

Keywords

Comments

If n is odd, then phi(n) = phi(2n) so that a(n)>=1.
If n is a member of A043343, then a(n)=0.
It seems that every nonnegative integer appears in this sequence.

Examples

			For n=2: phi(2) = 1; whereas phi(2+1) = 2 and phi(2+2) = 2. Thus a(2) = 0.
For n=5: phi(5) = 4, phi(5+1)=2, phi(5+2)=6, phi(5+3) = 4, phi(5+4) = 6, and phi(5+5) = 4. Since phi(5) = phi(5+3) = phi(5+5), a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Range@ n, k_ /; EulerPhi@ n == EulerPhi[n + k]], {n, 120}] (* Michael De Vlieger, Apr 25 2016 *)
  • PARI
    a(n) = my(x=eulerphi(n)); sum(k=1, n, eulerphi(n+k) == x); \\ Michel Marcus, Mar 08 2020
  • Python
    from sympy import totient
    nmax = 10**4
    philist = [totient(i) for i in range(1,2*nmax+1)]
    A272328_list = [philist[i+1:2*(i+1)].count(philist[i]) for i in range(nmax)] # Chai Wah Wu, Apr 26 2016
    
  • Sage
    [sum([1 for k in [1..n] if euler_phi(n)==euler_phi(n+k)]) for n in [1..1000]]
    

A066705 Greatest k < n such that phi(k) = phi(n) if such k exists, otherwise 0.

Original entry on oeis.org

0, 1, 0, 3, 0, 4, 0, 5, 7, 8, 0, 10, 0, 9, 0, 15, 0, 14, 0, 16, 13, 11, 0, 20, 0, 21, 19, 26, 0, 24, 0, 17, 25, 32, 0, 28, 0, 27, 35, 34, 0, 36, 0, 33, 39, 23, 0, 40, 43, 44, 0, 45, 0, 38, 41, 52, 37, 29, 0, 48, 0, 31, 57, 51, 0, 50, 0, 64, 0, 56, 0, 70, 0, 63, 55, 74, 61, 72, 0, 68, 0
Offset: 1

Views

Author

Vladeta Jovovic, Jan 14 2002

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {my(v = select(x -> xAmiram Eldar, Nov 14 2024, using Max Alekseyev's invphi.gp
Showing 1-6 of 6 results.