OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
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
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