A050473 Smallest k such that phi(k+n) = 2*phi(k).
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
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
- Andrzej Makowski, On the equation phi(n+k)=2*phi(n), Elem. Math., Vol. 29, No. 1 (1974), p. 13.
Crossrefs
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
Comments