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

A066659 Least k > n such that phi(k) = phi(n), if such k exists; = 0 otherwise.

Original entry on oeis.org

2, 0, 4, 6, 8, 0, 9, 10, 14, 12, 22, 0, 21, 18, 16, 20, 32, 0, 27, 24, 26, 0, 46, 30, 33, 28, 38, 36, 58, 0, 62, 34, 44, 40, 39, 42, 57, 54, 45, 48, 55, 0, 49, 50, 52, 0, 94, 60, 86, 66, 64, 56, 106, 0, 75, 70, 63, 0, 118, 0, 77, 0, 74, 68, 104, 0, 134, 80, 92, 72, 142, 78, 91
Offset: 1

Views

Author

Joseph L. Pe, Jan 10 2002

Keywords

Crossrefs

Programs

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

Extensions

More terms from Vladeta Jovovic, Jan 12 2002
Typo in data fixed by Paul Tek, Sep 20 2015

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

A171935 Forward van Eck transform of A000010.

Original entry on oeis.org

1, 0, 1, 2, 3, 0, 2, 2, 5, 2, 11, 0, 8, 4, 1, 4, 15, 0, 8, 4, 5, 0, 23, 6, 8, 2, 11, 8, 29, 0, 31, 2, 11, 6, 4, 6, 20, 16, 6, 8, 14, 0, 6, 6, 7, 0, 47, 12, 37, 16, 13, 4, 53, 0, 20, 14, 6, 0, 59, 0, 16, 0, 11, 4, 39, 0, 67, 12, 23, 2, 71, 6, 18, 2, 7, 32, 16, 6, 79, 16, 81, 6, 83, 6, 43, 12, 29, 12
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2010

Keywords

Crossrefs

Cf. A043343 (positions of zeros).
Showing 1-4 of 4 results.