

A340255


Lexicographically earliest sequence of distinct nonnegative terms such that for any n >= 0, a(n+1) is obtained by altering the leftmost digit (which is not a leading zero) in the factorial base representation of a(n) or if this is not possible by altering the rightmost leading zero in the factorial base representation of a(n).


2



0, 1, 3, 5, 4, 2, 8, 14, 20, 18, 6, 12, 16, 10, 22, 23, 11, 17, 13, 7, 19, 21, 9, 15, 39, 63, 87, 111, 99, 27, 51, 75, 81, 33, 57, 105, 117, 45, 69, 93, 91, 43, 67, 115, 97, 25, 49, 73, 79, 31, 55, 103, 109, 37, 61, 85, 89, 41, 65, 113, 101, 29, 53, 77, 83, 35
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

This sequence appears to be a permutation of the nonnegative integers.


LINKS



EXAMPLE

The first terms, alongside their representation in factorial base, are:
n a(n) fact(a(n))
  
0 0 0
1 1 1
2 3 11
3 5 21
4 4 20
5 2 10
6 8 110
7 14 210
8 20 310
9 18 300
10 6 100
11 12 200
12 16 220
13 10 120
14 22 320
15 23 321
16 11 121


PROG

(PARI) See Links section.


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



