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

A050473 Smallest k such that phi(k+n) = 2*phi(k).

Original entry on oeis.org

2, 1, 1, 2, 1, 4, 3, 4, 3, 5, 5, 8, 26, 7, 5, 8, 9, 12, 5, 10, 7, 8, 46, 16, 5, 13, 9, 14, 7, 25, 21, 13, 9, 17, 7, 24, 62, 19, 11, 20, 76, 28, 13, 16, 15, 23, 17, 32, 21, 25, 17, 26, 52, 36, 11, 28, 13, 26, 13, 45, 74, 28, 17, 26, 13, 39, 33, 31, 21, 32, 13, 48, 39, 37, 25, 38
Offset: 1

Views

Author

Jud McCranie, Dec 24 1999

Keywords

Comments

Makowski proved that the sequence is well-defined.
It appears that k <= 2n, with equality for the n in A110196 only. Computations for n < 10^6 appear to show that k < n for all but a finite number of n. - T. D. Noe, Jul 15 2005

Examples

			phi(13+26) = 24 = 2*phi(13), so a(13) = 26.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B36, p. 138.

Crossrefs

Cf. A110179 (least k such that phi(n+k)=2*phi(n)).

Programs

  • Mathematica
    Table[k=1; While[EulerPhi[n+k] != 2*EulerPhi[k], k++ ]; k, {n, 100}] (Noe)
  • PARI
    f(n) = apply(x -> x - n, select(x -> x > n, invphi(2*eulerphi(n)))); \\ using Max Alekseyev's invphi.gp
    lista(len) = {my(v = vector(len), c = 0, k = 1, s); while(c < len, s = f(k); for(i = 1, #s, if(s[i] <= len && v[s[i]] == 0, c++; v[s[i]] = k)); k++); v;} \\ Amiram Eldar, Nov 05 2024

A110192 Least k > n such that phi(k) = 2*phi(n), where phi is Euler's totient function.

Original entry on oeis.org

3, 3, 5, 5, 15, 8, 13, 15, 13, 15, 25, 15, 35, 21, 17, 17, 51, 21, 37, 32, 35, 25, 69, 32, 41, 35, 37, 35, 87, 32, 61, 51, 41, 51, 65, 39, 73, 57, 65, 51, 123, 45, 129, 55, 65, 69, 141, 51, 129, 55, 85, 65, 159, 57, 123, 65, 73, 87, 177, 64, 143, 77, 73, 85, 97, 75, 161, 85
Offset: 1

Views

Author

T. D. Noe, Jul 15 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Table[k=n+1; e=EulerPhi[n]; While[EulerPhi[k] != 2e, k++ ]; k, {n, 100}]
  • PARI
    a(n) = vecmin(select(x -> x > n, invphi(2*eulerphi(n)))); \\ Amiram Eldar, Nov 05 2024, using Max Alekseyev's invphi.gp

Formula

a(n) = A110179(n) + n.
Showing 1-2 of 2 results.