login
Lexicographically earliest sequence of distinct positive integers such that two consecutive terms have different initial digits.
3

%I #7 Aug 28 2024 09:38:30

%S 1,2,3,4,5,6,7,8,9,10,20,11,21,12,22,13,23,14,24,15,25,16,26,17,27,18,

%T 28,19,29,30,40,31,41,32,42,33,43,34,44,35,45,36,46,37,47,38,48,39,49,

%U 50,60,51,61,52,62,53,63,54,64,55,65,56,66,57,67,58,68

%N Lexicographically earliest sequence of distinct positive integers such that two consecutive terms have different initial digits.

%C This sequence is a permutation of the positive integers with inverse A375756.

%H Rémy Sigrist, <a href="/A375755/b375755.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A375755/a375755.gp.txt">PARI program</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F A000030(a(n)) <> A000030(a(n+1)).

%e The first terms, alongside the corresponding initial digits, are:

%e n a(n) Initial digit

%e -- ---- -------------

%e 1 1 1

%e 2 2 2

%e 3 3 3

%e 4 4 4

%e 5 5 5

%e 6 6 6

%e 7 7 7

%e 8 8 8

%e 9 9 9

%e 10 10 1

%e 11 20 2

%e 12 11 1

%e 13 21 2

%e 14 12 1

%e 15 22 2

%o (PARI) \\ See Links section.

%Y Cf. A000030, A375756 (inverse), A375757.

%K nonn,base,easy

%O 1,2

%A _Rémy Sigrist_, Aug 26 2024