OFFSET
1,3
COMMENTS
The mentioned absolute differences are always < 2.
LINKS
Dominic McCarty, Table of n, a(n) for n = 1..10000
EXAMPLE
The digits touching the 1st comma (0 and 1) have an absolute difference of 1;
The digits touching the 2nd comma (1 and 1) have an absolute difference of 0;
The digits touching the 3rd comma (0 and 1) have an absolute difference of 1;
The digits touching the 4th comma (1 and 1) have an absolute difference of 0;
The digits touching the 5th comma (2 and 2) have an absolute difference of 0;
The digits touching the 6th comma (2 and 2) have an absolute difference of 0;
The digits touching the 7th comma (0 and 1) have an absolute difference of 1;
The digits touching the 8th comma (3 and 3) have an absolute difference of 0;
The digits touching the 9th comma (3 and 3) have an absolute difference of 0; etc.
PROG
(Python)
from itertools import count
a = [0]
while len(a) < 30: a.append(next(k for k in count() if k not in a and ((r:=a[-1]%10)==(l:=int(str(k)[0])) or ((r, l)==(0, 1)))))
print(a) # Dominic McCarty, Mar 24 2025
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Jul 10 2024
STATUS
approved
