%I #6 Oct 17 2021 15:28:58
%S 1,2,2,3,4,4,5,5,6,6,6,6,7,7,7,8,8,8,9,9,9,9,10,10,10,10,10,11,11,11,
%T 12,12,13,13,13,13,14,14,14,14,15,15,15,15,15,16,16,16,17,17,17,17,17,
%U 17,18,19,19,19,19,19,19,19,20,20,21,21,21,21,21,22,22
%N Lexicographically earliest sequence of positive integers such that for any n > 0, a(n) is the number of nonempty runs of consecutive terms whose sum is n.
%C This sequence has similarities with Golomb's sequence (A001462); here we consider sums of one or more consecutive terms, there single terms.
%C This sequence is not weakly increasing: a(724) = 91 > a(725) = 90.
%H Rémy Sigrist, <a href="/A348386/a348386.txt">C program for A348386</a>
%e The first terms, alongside the sums a(n), a(n)+a(n-1), ..., are:
%e n a(n) Partial sums
%e -- ---- -------------------------------------
%e 1 1 1
%e 2 2 2, 3
%e 3 2 2, 4, 5
%e 4 3 3, 5, 7, 8
%e 5 4 4, 7, 9, 11, 12
%e 6 4 4, 8, 11, 13, 15, 16
%e 7 5 5, 9, 13, 16, 18, 20, 21
%e 8 5 5, 10, 14, 18, 21, 23, 25, 26
%e 9 6 6, 11, 16, 20, 24, 27, 29, 31, 32
%e 10 6 6, 12, 17, 22, 26, 30, 33, 35, 37, 38
%o (C) See Links section.
%Y Cf. A001462, A348385 (multiplicative variant).
%K nonn
%O 1,2
%A _Rémy Sigrist_, Oct 16 2021
|