login
A362064
Lexicographically earliest sequence of distinct positive integers such that the digit "1" is neither present in a(n) nor in a(n) + a(n+1).
1
2, 3, 4, 5, 20, 6, 22, 7, 23, 9, 24, 8, 25, 27, 26, 28, 29, 30, 32, 33, 34, 35, 37, 36, 38, 39, 40, 42, 43, 44, 45, 47, 46, 48, 49, 50, 200, 52, 202, 53, 203, 54, 204, 55, 205, 57, 206, 56, 207, 58, 208, 59, 209, 60, 220, 62, 222, 63, 223, 64, 224, 65, 225, 67
OFFSET
1,1
LINKS
EXAMPLE
2 + 3 = 5; 3 + 4 = 7; 4 + 5 = 9; but as 5 + 6 = 11 we cannot use 6 nor 7 (sum 12), 8 (sum 13) and 9 (sum 14); we cannot use the integers 10 to 19 (as a 1 is present in them), so a(5) = 20 as 5 + 20 = 25, etc.
PROG
(Python)
from itertools import islice
def jump1(n):
s = str(n)
return n if "1" not in s else int(s[:(i:=s.index("1"))]+"2"+"0"*(len(s)-i-1))
def agen(): # generator of terms
an, aset, mink = 2, {2}, 3
while True:
yield an
k = mink
while k in aset or "1" in str(an+k): k = jump1(k+1)
an = k
aset.add(an)
while mink in aset: mink = jump1(mink+1)
print(list(islice(agen(), 64))) # Michael S. Branicky, Apr 07 2023
CROSSREFS
Sequence in context: A377072 A261639 A333993 * A342617 A329579 A024635
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Cécile Angelini, Apr 07 2023
EXTENSIONS
a(27) and beyond from Michael S. Branicky, Apr 07 2023
STATUS
approved