login
A108192
Numbers k such that k and the product of the digits of k have at least one digit in common.
1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 26, 30, 31, 35, 40, 41, 46, 50, 51, 53, 55, 57, 59, 60, 61, 62, 64, 66, 68, 70, 71, 75, 80, 81, 86, 90, 91, 95, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116
OFFSET
1,3
LINKS
EXAMPLE
Product of digits of 26 is 12 (2*6=12); "26" and "12" share the digit "2".
MATHEMATICA
Select[Range[0, 116], Length[Intersection[IntegerDigits[#], IntegerDigits[Apply[Times, IntegerDigits[#]]]]]>0&] (* James C. McMahon, Feb 25 2024 *)
PROG
(Python)
from math import prod
def ok(n): return set(s:=str(n)) & set(str(prod(map(int, s)))) != set()
print([k for k in range(117) if ok(k)]) # Michael S. Branicky, Feb 25 2024
CROSSREFS
Cf. A007954.
Sequence in context: A246101 A241673 A258009 * A250395 A371123 A273880
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jun 15 2005
STATUS
approved