OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
25 has divisors 1, 5 and 25, all of which (except 1) contain the digit 5.
MATHEMATICA
fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 1500], fQ[#, 5] &] (* Robert G. Wilson v, Jun 11 2014 *)
PROG
(Magma) [k:k in [2..1500]| forall{d:d in Set(Divisors(k)) diff {1}| 5 in Intseq(d)}]; // Marius A. Burtea, Nov 07 2019
(Python)
from sympy import divisors
def ok(n): return all('5' in str(d) for d in divisors(n)[1:])
print(list(filter(ok, range(2, 1512)))) # Michael S. Branicky, May 25 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Erich Friedman, Jul 04 2001
EXTENSIONS
Offset corrected by Amiram Eldar, Nov 07 2019
STATUS
approved