login
Lexicographically earliest sequence of distinct positive terms such that the cumulative sum of the first a(n) terms ends in a(n).
1

%I #19 Feb 22 2020 22:24:10

%S 1,3,9,5,7,8,14,11,21,12,20,101,15,87,201,17,85,19,83,301,401,23,79,

%T 25,77,27,75,29,73,31,71,33,69,35,67,37,65,39,63,41,61,43,59,45,57,47,

%U 55,49,53,51,151,54,148,501,601,58,144,701,801,62,140,901,1001,66,136,1101,1201,70,132,1301,1401,74

%N Lexicographically earliest sequence of distinct positive terms such that the cumulative sum of the first a(n) terms ends in a(n).

%H Carole Dubois, <a href="/A332564/b332564.txt">Table of n, a(n) for n = 1..5000</a>

%e The cumulative sum of the first term (1) ends in 1;

%e the cumulative sum of the first 3 terms (1+3+9=13) ends in 3;

%e the cumulative sum of the first 9 terms (1+3+9+5+7+8+14+11+21=79) ends in 9;

%e the cumulative sum of the first 5 terms (1+3+9+5+7=25) ends in 5;

%e the cumulative sum of the first 7 terms (1+3+9+5+7+8+14=47) ends in 7;

%e the cumulative sum of the first 8 terms (1+3+9+5+7+8+14+11=58) ends in 8;

%e the cumulative sum of the first 14 terms (1,3,9,5,7,8,14,11,21,12,20,101,15,87=314) ends in 14; etc.

%K base,nonn

%O 1,2

%A _Eric Angelini_ and _Carole Dubois_, Feb 16 2020