login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357377 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that |a(n) - a(n-1)| does not appear in the string concatenation of a(0)..a(n-1). 2
0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 2, 6, 10, 14, 22, 4, 12, 20, 28, 44, 8, 24, 40, 56, 18, 34, 50, 23, 39, 55, 26, 42, 58, 29, 45, 61, 31, 47, 63, 27, 43, 59, 75, 37, 53, 69, 85, 36, 52, 68, 30, 46, 62, 78, 94, 110, 33, 49, 65, 81, 97, 113, 41, 57, 73, 35, 51, 67, 105, 143, 16, 54 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 20, 24, 43 and 115. It is likely no more exist although this is unknown.
There are no other fixed points in the first 870000 terms. - Michael S. Branicky, Oct 05 2022
LINKS
Scott R. Shannon, Image for n=0..200000. The green line is a(n) = n.
EXAMPLE
a(12) = 25 as the concatenation of a(0)..a(11) is "013579111315171921" and |25 - a(11)| = |25 - 21| = 4 which does not appear in the concatenated string. Since a(11) contains a '2' and all other odd numbers appear in the string a(12) cannot be 23 or any even number less than 25.
a(13) = 2 as the concatenation of a(0)..a(12) is "01357911131517192125" and |2 - a(12)| = |2 - 25| = 23 which does not appear in the concatenated string.
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
for n in count(0):
yield an; aset.add(an); astr += str(an)
prevan, an = an, mink
while an + mindiff <= prevan and (an in aset or str(abs(an-prevan)) in astr): an += 1
if an in aset or str(abs(an-prevan)) in astr:
an = max(mink, prevan + mindiff)
while an in aset or str(an-prevan) in astr:
an += 1
while mink in aset: mink += 1
while str(mindiff) in astr: mindiff += 1
print(list(islice(agen(), 75))) # Michael S. Branicky, Oct 05 2022
CROSSREFS
Sequence in context: A246411 A158333 A293167 * A062505 A230104 A093031
KEYWORD
nonn,base,look
AUTHOR
Scott R. Shannon, Sep 26 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 11:34 EDT 2024. Contains 374394 sequences. (Running on oeis4.)