login
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
OFFSET
1,1
COMMENTS
Numbers k such that A037278(k), A176558(k) and A243360(k) contain 2 distinct digits.
Many of the composite terms are in A203897. - Charles R Greathouse IV, Sep 06 2016
Terms are either repdigit numbers (A010785) or contain only 1 and a single other digit. - Michael S. Branicky, Nov 16 2022
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 4317 terms from Robert Israel)
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:
sort(convert(Res, list)): # Robert Israel, Sep 05 2016
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)
print(list(islice(agen(), 52))) # Michael S. Branicky, Nov 16 2022
CROSSREFS
Sequences of numbers n such that the list of divisors of n contains k distinct digits for 1 <= k <= 10: k = 1: A243534; k = 2: A243535; k = 3: A243536; k = 4: A243537; k = 5: A243538; k = 6: A243539; k = 7: A243540; k = 8: A243541; k = 9: A243542; k = 10: A095050.
Cf. A243543 (the smallest number m whose list of divisors contains n distinct digits).
Sequence in context: A126058 A233008 A233009 * A308078 A050757 A059168
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Jun 13 2014
STATUS
approved