login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359356
a(n-1) + a(n) has only digits also in a(n); lexicographically earliest such sequence of distinct nonnegative integers.
3
0, 1, 10, 12, 179, 132, 1048, 416, 135, 126, 125, 1025, 136, 15, 146, 82, 31, 302, 53, 128, 183, 130, 14, 157, 1254, 139, 304, 73, 41, 403, 74, 208, 103, 152, 1028, 91, 21, 201, 32, 159, 506, 160, 17, 124, 1036, 104, 51, 504, 95, 16, 204, 62, 129, 203, 52, 503
OFFSET
0,3
COMMENTS
Conjectured to be a permutation of the nonnegative integers.
LINKS
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
Cf. A359517 (conjectured inverse permutation).
Sequence in context: A155005 A219213 A078217 * A178639 A087392 A255534
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Dec 27 2022
STATUS
approved