login
A363186
Lexicographically earliest sequence of distinct positive integers such that the sum of all terms a(1)..a(n) is a substring of the concatenation of all terms a(1)..a(n).
4
1, 10, 98, 767, 111, 122, 2, 11, 100, 889, 110, 4490, 400, 560, 1096, 124, 20, 129, 70, 502, 93, 171, 212, 361, 512, 26, 21, 36, 54, 14, 1011, 139, 99, 59, 550, 684, 345, 102, 1021, 1999, 2871, 137, 892, 89, 126, 875, 510, 994, 586, 2012, 662, 1836, 201, 405, 388, 2007, 2798, 1641, 50, 340
OFFSET
1,2
COMMENTS
In the first 10000 terms the smallest number that has not yet appeared is 696; it is therefore likely all numbers eventually appear although this is unknown.
LINKS
Eric Angelini, Échecs et Maths, Personal blog, July 2023.
EXAMPLE
a(2) = 10 as a(1) + 10 = 1 + 10 = 11 which is a substring of "1" + "10" = "110".
a(3) = 98 as a(1) + a(2) + 98 = 1 + 10 + 98 = 109 which is a substring of "1" + "10" + "98" = "11098".
a(4) = 767 as a(1) + a(2) + a(3) + 767 = 1 + 10 + 98 + 767 = 876 which is a substring of "1" + "10" + "98" + "767" = "11098767".
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
s, mink, aset, concat = 1, 2, {1}, "1"
yield from [1]
while True:
an = mink
while an in aset or not str(s+an) in concat+str(an): an += 1
aset.add(an); s += an; concat += str(an); yield an
while mink in aset: mink += 1
print(list(islice(agen(), 60))) # Michael S. Branicky, Feb 08 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved