A371862 Positive integers that can be written as the product of two or more other integers, none of which uses any of the digits in the number itself.
4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 21, 24, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 49, 52, 54, 56, 57, 58, 60, 63, 64, 66, 68, 69, 70, 72, 76, 78, 80, 81, 84, 86, 87, 88, 90, 96, 98, 99, 100, 102, 104, 106, 108, 110, 111, 112, 114, 116, 117, 118, 120
Offset: 1
Examples
60 is a term because it can be expressed as 4 * 15, avoiding its own digits 6 and 0. 50 isn't because there is no way of expressing 50 avoiding both 5 and 0. 112 is a term since 112 = 4*4*7 and is the first term requiring a product with three factors.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
- Bernardo Recamán Santos, Melissa's Numbers, Puzzling Stack Exchange, Mar 13 2024.
Programs
-
Python
from sympy import divisors, isprime from functools import cache @cache def ok(n, avoid=tuple()): if avoid == tuple(): avoid = set(str(n)) else: avoid = set(avoid) if n%10 == 5 or len(avoid) == 10 or isprime(n): return False for d in divisors(n)[1:-1]: if set(str(d)) & avoid == set(): if set(str(n//d)) & avoid == set(): return True if ok(n//d, tuple(sorted(avoid))): return True return False print([k for k in range(200) if ok(k)]) # Michael S. Branicky, Apr 10 2024
Comments