Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A062678
Composite and every divisor (except 1) contains the digit 8.
18
6889, 7387, 23489, 25187, 31789, 32287, 34087, 48721, 50861, 56689, 60787, 68143, 68309, 68641, 68807, 73289, 73781, 76807, 78053, 78409, 78587, 78943, 78961, 80089, 81589, 87487, 88147, 98023, 98521, 106489, 106987, 108389, 110087
OFFSET
1,1
LINKS
EXAMPLE
7387 has divisors 83, 89 and 7387, each of which contains the digit 8.
MATHEMATICA
fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 110100], !PrimeQ[#] && fQ[#, 8] &] (* Robert G. Wilson v, Jun 11 2014 *)
dc8Q[n_]:=AllTrue[Rest[Divisors[n]], DigitCount[#, 10, 8]>0&]; Select[Range[ 111000], CompositeQ[ #]&&dc8Q[#]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 30 2020 *)
PROG
(Magma) [k:k in [2..120000]| not IsPrime(k) and forall{d:d in Set(Divisors(k)) diff {1}| 8 in Intseq(d)}]; // Marius A. Burtea, Nov 07 2019
KEYWORD
base,easy,nonn
AUTHOR
Erich Friedman, Jul 04 2001
EXTENSIONS
Offset corrected by Amiram Eldar, Nov 07 2019
STATUS
approved