The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A364326 Underline the k-th digit of a(n), k being the rightmost digit of a(n). This is the lexicographically earliest sequence of distinct terms > 0 such that the succession of the underlined digit is the succession of the sequence's digits themselves. 2
1, 11, 101, 111, 102, 112, 121, 131, 141, 151, 202, 12, 161, 171, 21, 181, 22, 191, 212, 31, 312, 412, 41, 512, 612, 51, 712, 32, 302, 42, 812, 52, 912, 61, 1001, 1011, 71, 1013, 62, 1021, 1031, 81, 1041, 72, 82, 1051, 91, 1061, 92, 1071, 122, 103, 1081, 113, 1091, 201, 142, 1101, 211, 242 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
The rightmost digit of a(1) = 1 is 1: this digit underlines the 1st digit of a(1) which is (1);
The rightmost digit of a(2) = 11 is 1: this digit underlines the 1st digit of a(2) which is (1);
The rightmost digit of a(3) = 101 is 1: this digit underlines the 1st digit of a(3) which is (1);
The rightmost digit of a(4) = 111 is 1: this digit underlines the 1st digit of a(4) which is (1);
The rightmost digit of a(5) = 102 is 2: this digit underlines the 2nd digit of a(5) which is (0);
The rightmost digit of a(6) = 112 is 2: this digit underlines the 2nd digit of a(6) which is (1); etc.
We see that the parenthesized digits at the end of each line reproduce the succession of the original digits.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=1; While[If[(f=Mod[k, 10])>IntegerLength@k||f==0, True, If[IntegerDigits[k][[f]]!=Flatten[IntegerDigits/@Join[Array[a, n-1], {k}]][[n]], True]]||MemberQ[Array[a, n-1], k], k++]; k); Array[a, 60] (* Giorgos Kalogeropoulos, Jul 19 2023 *)
PROG
(Python)
from itertools import count, filterfalse
def check(x):
y = str(x)
if int(y[-1])> len(y) or y[-1] == '0': return(True)
def A364326_list(max_n):
A, S, Z, zx = [], set(), '', 0
for n in range(1, max_n+1):
for i in filterfalse(S.__contains__, count(1)):
if check(i): S.add(i)
else:
x = str(i)
u = x[int(x[-1])-1]
if len(Z) == zx and u == x[0]: break
elif u == Z[zx]: break
A.append(i); S.add(i); Z += x; zx += 1
return(A) # John Tyler Rascoe, Oct 23 2023
CROSSREFS
Cf. A364325.
Sequence in context: A278937 A038444 A115824 * A208259 A043036 A072001
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Jul 18 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 12:49 EDT 2024. Contains 372736 sequences. (Running on oeis4.)