OFFSET
1,2
COMMENTS
Odd terms in A007602.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..6430
EXAMPLE
135 is in the sequence as it is odd and it is divisible by the product of its digits namely 1*3*5 = 15.
MATHEMATICA
Select[Range[1, 100000, 2], Quiet@Mod[#, Times@@IntegerDigits@#]==0&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
PROG
(PARI) is(n) = {if(n%2 == 0, return(0)); my(vp = vecprod(digits(n))); if(vp > 0, c = n/vp; if(denominator(c) == 1, return(1))); 0 } \\ David A. Corneth, Mar 30 2021
(Python)
from math import prod
def pd(o): return prod(int(d) for d in str(o))
def aupto(limit):
return [o for o in range(1, limit+1, 2) if pd(o) and o%pd(o) == 0]
print(aupto(111135)) # Michael S. Branicky, Mar 30 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
David A. Corneth, Mar 30 2021
STATUS
approved