OFFSET
0,3
COMMENTS
Conjectured to be a permutation of the nonnegative integers.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
Eric Angelini, A last pair sum linked to an alphabet, [math-fun] list, Dec. 26, 2022.
EXAMPLE
The sequence of pairwise sums a(n-1) + a(n), n > 0, is (1, 11, 22, 191, 311, 1180, 1464, 551, 261, 251, 1150, 1161, 151, 161, 228, 113, 333, 355, 181, 311, ...)
After the smallest possible choice a(0) = 0, a(1) = 1 has the same digits as a(0) + a(1).
Then, a(2) = 10 is the smallest yet unused nonnegative integer such that a(1) + a(2) = 11 has all its digits also occurring in a(2). (The number 0 is excluded since it appeared earlier as a(0).)
Then, a(3) = 12 is the smallest yet unused nonnegative integer such that a(2) + a(3) = 22 has all its digits also occurring in a(3). (The smaller solutions 0 and 1 are again excluded since they appeared earlier.)
MAPLE
b:= proc() false end:
d:= proc(n) option remember; {convert(n, base, 10)[]} end:
a:= proc(n) option remember; local k; for k
while b(k) or d(a(n-1)+k) minus d(k)<>{} do od:
b(k):= true; k
end: a(0):=0:
seq(a(n), n=0..55); # Alois P. Heinz, Jan 03 2023
PROG
(Python)
def A359356(n, A=[0]):
while len(A) <= n:
t = 0
while t in A or any(d not in str(t) for d in str(t+A[-1])):
t += 1
A.append(t)
return A[n]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Dec 27 2022
STATUS
approved