%N Totients of the least numbers for which the totient is divisible by n.
%C From _Alonso del Arte_, Feb 03 2017: (Start)
%C One of the less obvious consequences of Dirichlet's theorem on primes in arithmetic progression is that this sequence is well-defined for all positive integers.
%C Suppose n is a nontotient (see A007617). Obviously a(n) != n. Dirichlet's theorem assures us that, if nothing else, there are infinitely many primes of the form nk + 1 for k positive (and in this case, k > 1). Then phi(nk + 1) = nk, suggesting a(n) = nk corresponding to the smallest k.
%C Of course not all a(n) are 1 less than a prime, such as 8, 20, 24, 54, etc. (End)
%H Vincenzo Librandi, <a href="/A066678/b066678.txt">Table of n, a(n) for n = 1..5000</a>
%F a(n) = A000010(A061026(n)).
%e a(23) = 46 because there is no solution to phi(x) = 23 but there are solutions to phi(x) = 46, like x = 47.
%e a(24) = 24 because there are solutions to phi(x) = 24, such as x = 35.
%t EulerPhi[mulTotientList = ConstantArray[1, 70]; k = 1; While[Length[vac = Rest[Flatten[Position[mulTotientList, 1]]]] > 0, k++; mulTotientList[[Intersection[Divisors[EulerPhi[k]], vac]]] *= k]; mulTotientList] (* _Vincenzo Librandi_ Feb 04 2017 *)
%t a[n_] := For[k=1, True, k++, If[Divisible[t = EulerPhi[k], n], Return[t]]];
%t Array[a, 64] (* _Jean-François Alcover_, Jul 30 2018 *)
%o def A066678(n):
%o s = 1
%o while euler_phi(s) % n: s += 1
%o return euler_phi(s)
%o print([A066678(n) for n in (1..64)]) # _Peter Luschny_, Feb 05 2017
%Y Cf. A000010, A066674, A066675, A066676, A066677, A067005, A061026.
%A _Labos Elemer_, Dec 22 2001