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.
%I A252022 #17 May 22 2025 10:21:41 %S A252022 1,2,3,4,5,10,6,11,7,12,13,14,15,20,8,21,16,22,17,30,9,40,18,31,23,24, %T A252022 25,32,26,33,34,35,41,27,42,36,43,44,45,50,19,60,28,51,37,52,46,53, %U A252022 100,29,70,101,38,61,102,47,110,39,120,48,111,54,103,55,104 %N A252022 Lexicographically earliest permutation of the positive integers, such that no carry occurs when adjacent terms are added in decimal representation. %C A252022 a(n+1) = smallest number, not occurring earlier, such that no carry occurs when adding it to a(n) in decimal arithmetic. %H A252022 Reinhard Zumkeller, <a href="/A252022/b252022.txt">Table of n, a(n) for n = 1..10000</a> %H A252022 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Carry.html">Carry</a> %H A252022 Wikipedia, <a href="http://en.wikipedia.org/wiki/Carry_(arithmetic)">Carry (arithmetic)</a> %H A252022 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %o A252022 (Haskell) %o A252022 import Data.List (delete) %o A252022 a252022 n = a252022_list !! (n-1) %o A252022 a252022_list = 1 : f [1] (drop 2 a031298_tabf) where %o A252022 f xs zss = g zss where %o A252022 g (ds:dss) = if all (<= 9) $ zipWith (+) xs ds %o A252022 then (foldr (\d v -> 10 * v + d) 0 ds) : f ds (delete ds zss) %o A252022 else g dss %o A252022 (Python) %o A252022 A252022_list, l, s, b = [1], [1], 2, set() %o A252022 for _ in range(10**3): %o A252022 i = s %o A252022 while True: %o A252022 if i not in b: %o A252022 li = [int(d) for d in str(i)[::-1]] %o A252022 for x,y in zip(li,l): %o A252022 if x+y > 9: %o A252022 break %o A252022 else: %o A252022 l = li %o A252022 b.add(i) %o A252022 A252022_list.append(i) %o A252022 while s in b: %o A252022 b.remove(s) %o A252022 s += 1 %o A252022 break %o A252022 i += 1 # _Chai Wah Wu_, Dec 14 2014 %Y A252022 Cf. A252001 (carries required); A252023 (inverse), A252079 (fixed points), A251984, A167831. %Y A252022 Cf. A262604 (first differences). %K A252022 nonn,base %O A252022 1,2 %A A252022 _Reinhard Zumkeller_, Dec 12 2014