login
A062680
Composite numbers whose divisors (except 1) all contain the digit 9.
18
1691, 2291, 3629, 5191, 5539, 5597, 6931, 7391, 7921, 7961, 8497, 8791, 9101, 9329, 9409, 9481, 9671, 9701, 10981, 10991, 11269, 13129, 13891, 14239, 15089, 15931, 15941, 16999, 17197, 17309, 17879, 17951, 17993, 18091, 18449, 18829, 18943
OFFSET
1,1
LINKS
EXAMPLE
7961 has divisors 19, 419 and 7961, all of which contain the digit 9.
MATHEMATICA
fQ[n_] := Union[Drop[Last /@ Sort /@ IntegerDigits[ Divisors[ n]], 1]] == {9}; Select[ Range[ 19110], fQ[ # ] == True && ! PrimeQ[ # ] &] (* Zak Seidov and Robert G. Wilson v, May 17 2005 *)
fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 19110], !PrimeQ[#] && fQ[#, 9] &] (* Robert G. Wilson v, Jun 11 2014 *)
PROG
(Magma) [k:k in [2..20000]| not IsPrime(k) and forall{d:d in Set(Divisors(k)) diff {1}| 9 in Intseq(d)}]; // Marius A. Burtea, Nov 07 2019
KEYWORD
base,easy,nonn
AUTHOR
Erich Friedman, Jul 04 2001
EXTENSIONS
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 16 2007
STATUS
approved