%I #29 Dec 05 2022 04:42:24
%S 254,422,482,502,526,529,542,562,842,1042,1642,2042,2246,2258,2402,
%T 2426,2434,2446,2458,2462,2474,2498,2518,2554,2558,2566,2578,2582,
%U 2594,2642,2654,2846,2854,2858,2921,3242,3254,3442,4022,4126,4162,4222,4226
%N Composite and every divisor (except for 1) contains the digit 2.
%C If k is in the sequence, then all composite divisors of k are in the sequence. - _Robert Israel_, Jul 11 2019
%H Robert Israel, <a href="/A062664/b062664.txt">Table of n, a(n) for n = 1..10000</a>
%e 254 has divisors 1, 2, 127 and 254, all of which except for 1 contain the digit 2.
%p filter:= proc(n) local D;
%p if isprime(n) then return false fi;
%p andmap(con2,numtheory:-divisors(n) minus {1})
%p end proc:
%p con2:= proc(n) option remember; member(2,convert(n,base,10)) end proc:
%p select(filter, [$4..10000]);# _Robert Israel_, Jul 11 2019
%t fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 4230], !PrimeQ[#] && fQ[#, 2] &] (* _Robert G. Wilson v_, Jun 11 2014 *)
%o (Magma) [m:m in [2..4300] | not IsPrime(m) and #[d:d in Divisors(m)|2 in Intseq(d)] eq #Divisors(m)-1]; // _Marius A. Burtea_, Jul 11 2019
%Y Cf. A062649, A062668, A062670, A062672, A062674, A062676, A062678, A062680, A243819.
%K base,easy,nonn
%O 1,1
%A _Erich Friedman_, Jul 04 2001
%E Offset changed by _Robert Israel_, Jul 11 2019