A244440 Numbers n such that n + phi(n) is a power of 10.
68, 668, 6668, 67744, 72352, 666668, 7143040, 66666752, 71430400, 666666752, 714304000, 6666666668, 7143040000, 71430400000, 666666666668, 666666668032, 714304000000, 714499133440, 7143040000000, 7144991334400
Offset: 1
Examples
68+phi(68) = 68+32 = 10^2. 72352+phi(72352) = 72352+27648 = 10^5.
Programs
-
Magma
[n: n in [1..10^7] | 10^Ilog(10,s) eq s where s is n+EulerPhi(n)]; // Bruno Berselli, Aug 05 2014
-
Maple
select(proc(n) local t; t:= n + numtheory:-phi(n); t = 10^ilog10(t) end proc, [$1..10^6]); # Robert Israel, Aug 04 2014
-
Mathematica
a244440[n_Integer] := Flatten[Position[Map[IntegerQ[Log10[# + EulerPhi[#]]] &, Range[n]], True]] (* Michael De Vlieger, Aug 03 2014 *)
-
PARI
for(n=1,10^7,v=digits(eulerphi(n)+n-1);if(vecmin(v)==9,print1(n,", "))) \\ Derek Orr, Aug 03 2014
-
PARI
for(n=1,10^7,if (ispower(eulerphi(n)+n,,&m) && (m==10), print1(n, ", "))); \\ Michel Marcus, Aug 04 2014
-
PARI
for(n=1, 10^9, my(t=eulerphi(n)+n, s=t/10^valuation(t,10)); if (s==1, print1(n, ", "))); \\ Joerg Arndt, Aug 05 2014
-
Python
from sympy import totient [n for n in range(1,10**7) if 10**(int(log10(n+totient(n)))) == n+totient(n)] # Chai Wah Wu, Aug 03 2014
Extensions
a(8)-a(14) from Hiroaki Yamanouchi, Aug 27 2014
a(15)-a(20) from Giovanni Resta, Jul 13 2015
Comments