A368955 Numbers that are the product of two repdigit numbers.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 49, 54, 55, 56, 63, 64, 66, 72, 77, 81, 88, 99, 110, 111, 121, 132, 154, 165, 176, 198, 220, 222, 231, 242, 264, 275, 297, 308, 330, 333
Offset: 1
Programs
-
Mathematica
repQ[n_] := SameQ @@ IntegerDigits[n]; q[n_] := AnyTrue[Divisors[n], repQ[#] && repQ[n/#] &]; q[0] = True; Select[Range[0, 333], q] (* Amiram Eldar, Jan 12 2024 *)
-
Python
from itertools import count, takewhile def repdigits(): yield 0 yield from ((10**d-1)//9*i for d in count(1) for i in range(1, 10)) def aupto(LIMIT): # use LIMIT = 10**34 for 10K+-term b-file s, R = set(), list(takewhile(lambda x:x<=LIMIT, repdigits())) for i, r1 in enumerate(R): for r2 in R[i:]: p = r1*r2 if p > LIMIT: break s.add(p) return sorted(s) print(aupto(333)) # Michael S. Branicky, Jan 10 2024
Formula
a(n) = A140332(n) for n <= 46.
Comments