OFFSET
1,1
COMMENTS
FORMULA
a(n) ~ n.
EXAMPLE
20 is in sequence because the list of divisors of 20: (1, 2, 4, 5, 10, 20) contains digit 5.
MATHEMATICA
Select[Range@108, Part[Plus @@ DigitCount@ Divisors@ #, 5] > 0 &]
Select[Range[200], Max[DigitCount[Divisors[#], 10, 5]]>0&] (* Harvey P. Dale, Sep 15 2018 *)
PROG
(Magma) [n: n in [1..1000] | [5] subset Setseq(Set(Sort(&cat[Intseq(d): d in Divisors(n)])))]
(PARI) is(n)=fordiv(n, d, if(setsearch(Set(digits(d)), 5), return(1))); 0
(Python)
from sympy import divisors
A257222_list = [n for n in range(1, 10**3) if '5' in set().union(*(set(str(d)) for d in divisors(n, generator=True)))] # Chai Wah Wu, May 06 2015
(Perl) use ntheory ":all"; for my $n (1..1000) { say $n if scalar(grep {/5/} divisors($n)) } # Dana Jacobsen, May 07 2015
(Perl) use ntheory ":all"; my @a257222 = grep { scalar(grep {/5/} divisors($_)) } 1..1000; # Dana Jacobsen, May 07 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, May 05 2015
EXTENSIONS
Mathematica and PARI programs with assistance from Michael De Vlieger and Charles R Greathouse IV, respectively.
STATUS
approved