login
Lexicographically earliest sequence of distinct positive terms such that the cumulative sum Q(n) of the first n terms of the sequence has at least one duplicated digit.
1

%I #8 Aug 02 2023 11:55:13

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

%T 27,24,21,29,31,28,32,30,38,35,39,37,43,41,40,51,36,42,44,47,45,46,48,

%U 50,53,58,52,54,56,49,57,55,59,61,60,64,65,62,69,63,66,72,68,74

%N Lexicographically earliest sequence of distinct positive terms such that the cumulative sum Q(n) of the first n terms of the sequence has at least one duplicated digit.

%C The sequence is infinite. Does a term a(n) exist such that from a(n) on a(n+1) is always a(n) + 1?

%e a(1) = 11 and Q(1) = 11 (with two 1s);

%e a(2) = 22 and Q(2) = 33 (with two 3s);

%e a(3) = 33 and Q(3) = 66 (with two 6s);

%e a(4) = 34 and Q(4) = 100 (with two 0s);

%e a(5) = 1 and Q(5) = 101 (with two 1s);

%e a(6) = 9 and Q(6) = 110 (with two 1s); etc.

%t a[1]=11;a[n_]:=a[n]=(k=1;While[DuplicateFreeQ@IntegerDigits@ Total[Join[c=Array[a,n-1],{k}]]||MemberQ[c,k],k++];k);Array[a,70] (* _Giorgos Kalogeropoulos_, Jul 19 2023 *)

%Y Cf. A364274.

%K base,nonn

%O 1,1

%A _Eric Angelini_, Jul 17 2023