close
login
A389420
Arrangement of numbers such that every digit rotation of the number n is included in ascending order after those of n-1.
3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 11, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 91, 2, 20, 12, 21, 22, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 3, 30, 13, 31, 23, 32, 33, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 4, 40, 14, 41
OFFSET
0,3
COMMENTS
a(0) = 0. For n > 0, let R(n) be the multiset of numbers obtained by cyclically permuting the digits of n, ignoring leading zeros. The elements of R(n), sorted into ascending order, are inserted into the sequence immediately after the terms associated with the digits of n-1.
Sequence can also be seen as an irregular table, where the n-th row corresponds to the sorted rotations of the digits of n. - Michael S. Branicky, Oct 03 2025
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10893 (rows 0..3000 of triangle, flattened).
EXAMPLE
The number 10 has rotations: 1, 10 so a(10) = 1 and a(11) = 10.
Rows begin:
0;
1;
2;
3;
4;
5;
6;
7;
8;
9;
1, 10;
11, 11;
12, 21;
13, 31;
...
MATHEMATICA
A389420row[n_] := Sort[Map[FromDigits, NestList[RotateLeft, #, Length[#] - 1]]] & [IntegerDigits[n]];
Array[A389420row, 50, 0] (* Paolo Xausa, Oct 18 2025 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
for n in count(0):
s = str(n)
yield from sorted(int(s[i:]+s[:i]) for i in range(len(s)))
print(list(islice(agen(), 74))) # Michael S. Branicky, Oct 03 2025
CROSSREFS
Cf. A055642 (row lengths), A389882 (row sums).
Sequence in context: A179933 A259433 A344487 * A047813 A391869 A084051
KEYWORD
nonn,base,tabf,easy,look
AUTHOR
Aitzaz Imtiaz, Oct 03 2025
STATUS
approved