OFFSET
1,1
COMMENTS
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).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Jun 13 2014
STATUS
approved