OFFSET
1,2
COMMENTS
a(n+1) = smallest number, not occurring earlier, such that no carry occurs when adding it to a(n) in decimal arithmetic.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Carry
Wikipedia, Carry (arithmetic)
PROG
(Haskell)
import Data.List (delete)
a252022 n = a252022_list !! (n-1)
a252022_list = 1 : f [1] (drop 2 a031298_tabf) where
f xs zss = g zss where
g (ds:dss) = if all (<= 9) $ zipWith (+) xs ds
then (foldr (\d v -> 10 * v + d) 0 ds) : f ds (delete ds zss)
else g dss
(Python)
A252022_list, l, s, b = [1], [1], 2, set()
for _ in range(10**3):
....i = s
....while True:
........if i not in b:
............li = [int(d) for d in str(i)[::-1]]
............for x, y in zip(li, l):
................if x+y > 9:
....................break
............else:
................l = li
................b.add(i)
................A252022_list.append(i)
................while s in b:
....................b.remove(s)
....................s += 1
................break
........i += 1 # Chai Wah Wu, Dec 14 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Dec 12 2014
STATUS
approved