login
A347182
Lexicographically earliest sequence of distinct positive integers such that all digits of a(n) are visible in a(n) * a(n+1).
2
1, 10, 11, 91, 9, 21, 6, 16, 26, 24, 18, 45, 12, 51, 3, 13, 27, 36, 38, 22, 56, 28, 29, 32, 41, 4, 31, 23, 14, 76, 89, 55, 47, 42, 7, 25, 5, 15, 34, 69, 39, 61, 92, 86, 8, 35, 67, 100, 17, 43, 78, 87, 33, 71, 81, 64, 54, 66, 96, 72, 99, 101, 109, 90, 44, 102, 60, 46, 79, 48, 58, 98, 151, 75, 37, 19
OFFSET
1,2
COMMENTS
a(3) = 11 has two digits "1"; they must both be visible in a(3) * a(4) and this is the case as a(3) * a(4) = 11 * 91 = 1001.
Is this a permutation of the positive integers? - Pontus von Brömssen, Aug 23 2021
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) * a(2) = 1 * 10 = 10;
a(2) * a(3) = 10 * 11 = 110;
a(3) * a(4) = 11 * 91 = 1001;
a(4) * a(5) = 91 * 9 = 819;
a(5) * a(6) = 9 * 21 = 189; etc.
PROG
(Python)
from collections import Counter
def A347182_list(n):
a = [1]
m = 2 # Smallest number not yet in a.
M = 1 # Largest number in a so far.
used = [] # Indicator for what numbers m..M that are in a so far.
for i in range(n - 1):
c0 = Counter(str(a[-1]))
x = m
while 1:
if x > M or not used[x - m]:
c = Counter(str(a[-1] * x))
if all(c[d] >= c0[d] for d in "0123456789"):
break
x += 1
if x > M:
used.extend([0] * (x - M - 1) + [1])
M = x
else:
used[x - m] = 1
if x == m:
j = next((j for j in range(len(used)) if not used[j]), len(used))
m += j
del used[:j]
a.append(x)
return a # Pontus von Brömssen, Aug 24 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Aug 22 2021
STATUS
approved