%I #17 Sep 19 2024 14:43:01
%S 1,3,7,9,13,21,31,37,43,49,63,67,73,79,93,111,127,129,151,163,169,189,
%T 193,201,211,219,223,237,241,259,273,283,307,331,349,367,409,421,433,
%U 463,487,489,511,541,553,559,577,579,601,613,619,631,643,651,673,723
%N Lucky numbers whose prime factors are also lucky numbers.
%H Amiram Eldar, <a href="/A118643/b118643.txt">Table of n, a(n) for n = 1..10000</a>
%e 189 is included since 189 is lucky and 189 = 3*3*3*7 has prime factors that are all lucky.
%t L = Table[2*i + 1, {i, 0,362}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];Select[L,ContainsOnly[First/@FactorInteger[#],L]&] (* _James C. McMahon_, Sep 19 2024 *)
%Y Cf. A000959, (lucky numbers), A043772 (superset).
%K easy,nonn
%O 1,2
%A Adam Panagos (adam.panagos(AT)gmail.com), May 10 2006