|
|
A243535
|
|
Numbers whose list of divisors contains 2 distinct digits (in base 10).
|
|
11
|
|
|
2, 3, 5, 7, 13, 17, 19, 22, 31, 33, 41, 55, 61, 71, 77, 101, 113, 121, 131, 151, 181, 191, 199, 211, 311, 313, 331, 661, 811, 881, 911, 919, 991, 1111, 1117, 1151, 1171, 1181, 1511, 1777, 1811, 1999, 2111, 2221, 3313, 3331, 4111, 4441, 6661, 7177, 7717, 8111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
121 is in the sequence because the list of divisors of 121, i.e., (1, 11, 121), contains 2 distinct digits (1, 2).
|
|
MAPLE
|
dmax:= 6: # get all terms of <= dmax digits
Res:= {}:
for a in [0, $2..9] do
S:= {0}:
for d from 1 to dmax do
S:= map(t -> (10*t+1, 10*t+a), S);
Res:= Res union select(filter, S)
od
od:
|
|
MATHEMATICA
|
Select[Range[9000], Length[Union[Flatten[IntegerDigits/@Divisors[ #]]]] == 2&] (* Harvey P. Dale, Dec 14 2017 *)
|
|
PROG
|
(Excel) [Row n = 1..10000; Column A: A(n) = A095048(n); Column B: B(n) = IF(A(n)=2; A(n)); Arrangement of column B]
(PARI) isok(n) = vd = []; fordiv(n, d, vd = concat(vd, digits(d))); #Set(vd) == 2; \\ Michel Marcus, Jun 13 2014
(Python)
from sympy import divisors
from itertools import count, islice, product
def ok(n):
s = set("1"+str(n))
if len(s) > 2: return False
for d in divisors(n, generator=True):
s |= set(str(d))
if len(s) > 2: return False
return len(s) == 2
def agen():
yield from [2, 3, 5, 7]
for d in count(2):
s = set()
for first, other in product("123456789", "0123456789"):
for p in product(sorted(set(first+other)), repeat=d-1):
if other not in p: continue
t = int(first+"".join(p))
if ok(t): s.add(t)
yield from sorted(s)
|
|
CROSSREFS
|
Cf. A243543 (the smallest number m whose list of divisors contains n distinct digits).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|