%I #14 Sep 08 2022 08:46:15
%S 4,5,7,8,9,11,13,16,17,32,73,105,165,195,256,257,496,512,527,585,976,
%T 992,1952,2205,2522,2593,2626,2835,3256,3706,5187,5188,5252,6512,7412,
%U 10013,10376,10605,11716,13366,13653,18316,21423,22936,23103,23432,23717
%N Numbers n such that phi(n) = k*phi(n-k) for some number 1 <= k < n - 2.
%C Prime terms are in A266266.
%C For all primes p we have: phi(p) = k*phi(p-k) if k = p - 1.
%H Robert G. Wilson v, <a href="/A266267/b266267.txt">Table of n, a(n) for n = 1..102</a>
%e 17 is in the sequence because phi(17) = 16 = 2*phi(15) = 2*8.
%t Select[Range@ 1000, Function[n, AnyTrue[Range[n - 2], EulerPhi@ n == # EulerPhi[n - #] &]]] (* _Michael De Vlieger_, Jan 09 2016, Version 10 *)
%t f[n_] := f[n] = EulerPhi@ n; k = 1; lst = {}; fQ[n_] := Block[{k = 1, ep = f@ n}, While[k + 2 < n && ep != k*f[n - k], k++]; k + 2 < n]; Select[ Range@ 25000, fQ@# &] (* _Robert G. Wilson v_, Jan 23 2016 *)
%o (Magma) Set(Sort([4, 5] cat [n: n in [6..100000], k in [1..5] | EulerPhi(n) eq k*EulerPhi(n-k)]))
%o (PARI) isok(n) = for (k=1, n-2, if (eulerphi(n) == k*eulerphi(n-k), return(1))); \\ _Michel Marcus_, Dec 27 2015
%Y Cf. A000010, A019434, A266266.
%K nonn
%O 1,1
%A _Jaroslav Krizek_, Dec 26 2015