OFFSET
1,3
COMMENTS
FORMULA
a(n) = A140332(n) for n <= 46.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Jan 10 2024
STATUS
approved