cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A362064 #21 Apr 07 2023 19:58:54
%S A362064 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 A362064 39,40,42,43,44,45,47,46,48,49,50,200,52,202,53,203,54,204,55,205,57,
%U A362064 206,56,207,58,208,59,209,60,220,62,222,63,223,64,224,65,225,67
%N 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).
%H A362064 Michael S. Branicky, <a href="/A362064/b362064.txt">Table of n, a(n) for n = 1..10000</a>
%e A362064 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 A362064 (Python)
%o A362064 from itertools import islice
%o A362064 def jump1(n):
%o A362064     s = str(n)
%o A362064     return n if "1" not in s else int(s[:(i:=s.index("1"))]+"2"+"0"*(len(s)-i-1))
%o A362064 def agen(): # generator of terms
%o A362064     an, aset, mink = 2, {2}, 3
%o A362064     while True:
%o A362064         yield an
%o A362064         k = mink
%o A362064         while k in aset or "1" in str(an+k): k = jump1(k+1)
%o A362064         an = k
%o A362064         aset.add(an)
%o A362064         while mink in aset: mink = jump1(mink+1)
%o A362064 print(list(islice(agen(), 64))) # _Michael S. Branicky_, Apr 07 2023
%Y A362064 Cf. A052383, A299957.
%K A362064 base,nonn
%O A362064 1,1
%A A362064 _Eric Angelini_ and Cécile Angelini, Apr 07 2023
%E A362064 a(27) and beyond from _Michael S. Branicky_, Apr 07 2023