OFFSET
1,1
COMMENTS
Lexicographically earliest sequence of distinct positive terms with this property.
Numbers with an odd digit length cannot be in this sequence.
EXAMPLE
a(1) * a(2) = 12 * 92 = 1104 (which has an equal number of even and odd digits);
a(2) * a(3) = 92 * 16 = 1472 (idem);
a(3) * a(4) = 16 * 67 = 1072 (idem);
a(4) * a(5) = 67 * 21 = 1407 (idem); etc.
PROG
(Python)
def cond(i):
stri = str(i)
se = sum(1 for d in stri if d in "02468")
so = sum(1 for d in stri if d in "13579")
return se == so
def aupto(nn):
alst, used = [1], set()
for n in range(1, nn+1):
an = 12
while True:
while an in used: an += 1
if cond(an) and cond(an * alst[-1]):
alst.append(an); used.add(an); break
an += 1
return alst[1:] # use alst[n] for a(n)
print(aupto(59)) # Michael S. Branicky, Dec 14 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Dec 14 2020
STATUS
approved