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

A362093
a(1) = 1, a(2) = 2; for n > 2, a(n) is the least positive integer not occurring earlier such that a(n) shares no digit with a(n-1) - a(n-2).
4
1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 22, 10, 30, 11, 23, 33, 24, 12, 34, 13, 35, 14, 36, 15, 37, 16, 38, 17, 39, 18, 40, 19, 43, 31, 44, 25, 26, 27, 28, 29, 32, 21, 42, 45, 41, 50, 46, 51, 47, 52, 48, 53, 49, 55, 54, 56, 57, 58, 59, 60, 62, 61, 63, 64, 65, 66, 67, 68, 69, 70, 72, 71, 73, 74, 75, 76, 77
OFFSET
1,2
COMMENTS
The sequence is likely to be finite although it contains at least 1 million terms.
Sequence is finite with 6080472 terms, since a(6080471) = 660606060 and a(6080472) = 8822811 have difference -651783249. - Michael S. Branicky, Apr 09 2023
LINKS
Michael S. Branicky, Python program
Scott R. Shannon, Image of the first 1 million terms. The green line is a(n) = n.
EXAMPLE
a(11) = 22 as a(10) - a(9) = 20 - 9 = 11, and 22 is the smallest unused number that does not contain the digit 1.
PROG
(Python) # see link for program that generates full sequence
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Apr 08 2023
STATUS
approved