cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A243535 Numbers whose list of divisors contains 2 distinct digits (in base 10).

This page as a plain text file.
%I A243535 #37 Nov 19 2022 21:08:15
%S A243535 2,3,5,7,13,17,19,22,31,33,41,55,61,71,77,101,113,121,131,151,181,191,
%T A243535 199,211,311,313,331,661,811,881,911,919,991,1111,1117,1151,1171,1181,
%U A243535 1511,1777,1811,1999,2111,2221,3313,3331,4111,4441,6661,7177,7717,8111
%N A243535 Numbers whose list of divisors contains 2 distinct digits (in base 10).
%C A243535 Numbers k such that A037278(k), A176558(k) and A243360(k) contain 2 distinct digits.
%C A243535 Many of the composite terms are in A203897. - _Charles R Greathouse IV_, Sep 06 2016
%C A243535 Terms are either repdigit numbers (A010785) or contain only 1 and a single other digit. - _Michael S. Branicky_, Nov 16 2022
%H A243535 David A. Corneth, <a href="/A243535/b243535.txt">Table of n, a(n) for n = 1..10000</a> (first 4317 terms from Robert Israel)
%e A243535 121 is in the sequence because the list of divisors of 121, i.e., (1, 11, 121), contains 2 distinct digits (1, 2).
%p A243535 dmax:= 6: # get all terms of <= dmax digits
%p A243535 Res:= {}:
%p A243535 for a in [0,$2..9] do
%p A243535     S:= {0}:
%p A243535     for d from 1 to dmax do
%p A243535         S:= map(t -> (10*t+1,10*t+a), S);
%p A243535         Res:= Res union select(filter, S)
%p A243535     od
%p A243535 od:
%p A243535 sort(convert(Res,list)): # _Robert Israel_, Sep 05 2016
%t A243535 Select[Range[9000],Length[Union[Flatten[IntegerDigits/@Divisors[ #]]]] == 2&] (* _Harvey P. Dale_, Dec 14 2017 *)
%o A243535 (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]
%o A243535 (PARI) isok(n) = vd = []; fordiv(n, d, vd = concat(vd, digits(d))); #Set(vd) == 2; \\ _Michel Marcus_, Jun 13 2014
%o A243535 (Python)
%o A243535 from sympy import divisors
%o A243535 from itertools import count, islice, product
%o A243535 def ok(n):
%o A243535     s = set("1"+str(n))
%o A243535     if len(s) > 2: return False
%o A243535     for d in divisors(n, generator=True):
%o A243535         s |= set(str(d))
%o A243535         if len(s) > 2: return False
%o A243535     return len(s) == 2
%o A243535 def agen():
%o A243535     yield from [2, 3, 5, 7]
%o A243535     for d in count(2):
%o A243535         s = set()
%o A243535         for first, other in product("123456789", "0123456789"):
%o A243535             for p in product(sorted(set(first+other)), repeat=d-1):
%o A243535                 if other not in p: continue
%o A243535                 t = int(first+"".join(p))
%o A243535                 if ok(t): s.add(t)
%o A243535         yield from sorted(s)
%o A243535 print(list(islice(agen(), 52))) # _Michael S. Branicky_, Nov 16 2022
%Y A243535 Cf. A095048, A037278, A176558, A243360.
%Y A243535 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.
%Y A243535 Cf. A243543 (the smallest number m whose list of divisors contains n distinct digits).
%K A243535 nonn,base
%O A243535 1,1
%A A243535 _Jaroslav Krizek_, Jun 13 2014