%I #53 Jun 28 2024 22:45:02
%S 1,2,3,4,5,6,8,10,12,19,27,38,54,2049,2732,4098,5779,11558,36717,
%T 48956,73434,21994424093409,29325898791212,43988848186818,
%U 439894502304193355596420713117,586526003072257807461894284156,879789004608386711192841426234,56570478046795035524653081529155199270281,56570478046795035532692004624509431078281
%N Numbers k such that phi(k) is a Lucas number.
%H Hugo Pfoertner, <a href="/A373194/b373194.txt">Table of n, a(n) for n = 1..64</a>
%H Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp).
%t lucasQ[n_] := Or @@ (IntegerQ[Sqrt[#]] & /@ (5*n^2 + 20*{-1, 1})); Select[Range[10^4], lucasQ[EulerPhi[#]] &] (* _Amiram Eldar_, May 27 2024 *)
%o (Python)
%o from sympy.ntheory.primetest import is_square
%o from sympy import totient
%o islucas = lambda n: is_square(5*n*n - 20) or is_square(5*n*n + 20)
%o print([n for n in range(1,10**4) if islucas(totient(n))])
%o (PARI) isok(k) = islucas(eulerphi(k)); \\ using islucas from A102460 \\ _Michel Marcus_, May 27 2024
%o (PARI) \\ read Max Alekseyev's invphi.gp
%o a373194(uptoNLucas) = my(A=List()); for(n=0, uptoNLucas, my(L = invphi(fibonacci(n+1) + fibonacci(n-1))); if(#L, for(k=1, #L, listput(A,L[k])))); Set(A);
%o a373194(150) \\ _Hugo Pfoertner_, Jun 10 2024
%Y Cf. A000010, A000032, A102460, A280592.
%K nonn
%O 1,2
%A _DarĂo Clavijo_, May 27 2024
%E a(18)-a(21) from _Amiram Eldar_, May 27 2024
%E a(22) onwards from _Hugo Pfoertner_, May 27 2024