login
A062672
Composite and every divisor (except 1) contains the digit 5.
18
25, 125, 265, 295, 625, 755, 785, 1255, 1285, 1325, 1475, 1765, 1795, 2285, 2515, 2545, 2605, 2615, 2705, 2735, 2785, 2815, 2845, 2855, 2885, 2935, 2965, 2995, 3125, 3265, 3295, 3755, 3775, 3785, 3925, 4265, 4285, 4295, 4765, 5255, 5755, 5765, 6275
OFFSET
1,1
LINKS
EXAMPLE
25 has divisors 1, 5 and 25, all of which contain the digit 5.
MATHEMATICA
fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 6300], !PrimeQ[#] && fQ[#, 5] &] (* Robert G. Wilson v, Jun 11 2014 *)
Select[Range[6300], CompositeQ[#]&&AllTrue[Rest[Divisors[#]], DigitCount[ #, 10, 5]> 0&]&] (* Harvey P. Dale, Jan 22 2023 *)
KEYWORD
base,easy,nonn
AUTHOR
Erich Friedman, Jul 04 2001
EXTENSIONS
Offset corrected by Amiram Eldar, Nov 07 2019
STATUS
approved