%I #11 Jul 14 2020 12:57:56
%S 0,0,1,2,3,0,2,0,4,5,6,1,5,4,7,8,9,3,10,11,12,13,14,0,8,1,11,10,15,0,
%T 16,7,17,16,18,2,19,17,20,21,22,15,23,24,25,26,27,0,13,12,24,19,28,1,
%U 21,20,29,30,31,6,30,29,32,33,34,28,35,36,37,38,39,2
%N Lexicographically earliest sequence of nonnegative terms such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in factorial base.
%H Rémy Sigrist, <a href="/A336207/b336207.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>
%H Rémy Sigrist, <a href="/A336207/a336207.txt">C program for A336207</a>
%F a(n) = 0 iff n belongs to A279732.
%e In factorial base:
%e - 1 = "1", 2 = "10", 3 = "11", 4 = "20",
%e - we can add without carry 1 and 2, so a(1) = a(2) = 0,
%e - 1 + 2 + 3 implies a carry, so a(3) = 1,
%e - 1 + 2 + 4 and 3 + 4 imply a carry, so a(4) = 2.
%o (C) See Links section.
%Y See A279125 and A336206 for similar sequences.
%Y Cf. A279732.
%K nonn,look,base
%O 1,4
%A _Rémy Sigrist_, Jul 12 2020