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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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

%I #21 Apr 07 2023 19:58:54

%S 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,

%T 39,40,42,43,44,45,47,46,48,49,50,200,52,202,53,203,54,204,55,205,57,

%U 206,56,207,58,208,59,209,60,220,62,222,63,223,64,224,65,225,67

%N 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).

%H Michael S. Branicky, <a href="/A362064/b362064.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%o (Python)

%o from itertools import islice

%o def jump1(n):

%o s = str(n)

%o return n if "1" not in s else int(s[:(i:=s.index("1"))]+"2"+"0"*(len(s)-i-1))

%o def agen(): # generator of terms

%o an, aset, mink = 2, {2}, 3

%o while True:

%o yield an

%o k = mink

%o while k in aset or "1" in str(an+k): k = jump1(k+1)

%o an = k

%o while mink in aset: mink = jump1(mink+1)

%o print(list(islice(agen(), 64))) # _Michael S. Branicky_, Apr 07 2023

%Y Cf. A052383, A299957.

%K base,nonn

%O 1,1

%A _Eric Angelini_ and Cécile Angelini, Apr 07 2023

%E a(27) and beyond from _Michael S. Branicky_, Apr 07 2023

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.

Last modified August 6 03:16 EDT 2024. Contains 374957 sequences. (Running on oeis4.)