This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A124757 #17 Jan 26 2023 17:44:28 %S A124757 0,0,0,1,0,1,2,3,0,1,2,3,3,4,5,6,0,1,2,3,3,4,5,6,4,5,6,7,7,8,9,10,0,1, %T A124757 2,3,3,4,5,6,4,5,6,7,7,8,9,10,5,6,7,8,8,9,10,11,9,10,11,12,12,13,14, %U A124757 15,0,1,2,3,3,4,5,6,4,5,6,7,7,8,9,10,5,6,7,8,8,9,10,11,9,10,11,12,12,13,14 %N A124757 Zero-based weighted sum of compositions in standard order. %C A124757 The standard order of compositions is given by A066099. %C A124757 Sum of all positions of 1's except the last in the reversed binary expansion of n. For example, the reversed binary expansion of 14 is (0,1,1,1), so a(14) = 2 + 3 = 5. Keeping the last position gives A029931. - _Gus Wiseman_, Jan 17 2023 %H A124757 Alois P. Heinz, <a href="/A124757/b124757.txt">Rows n = 0..14, flattened</a> %F A124757 For a composition b(1),...,b(k), a(n) = Sum_{i=1..k} (i-1)*b(i). %F A124757 For n>0, a(n) = A029931(n) - A070939(n). %e A124757 Composition number 11 is 2,1,1; 0*2+1*1+2*1 = 3, so a(11) = 3. %e A124757 The table starts: %e A124757 0 %e A124757 0 %e A124757 0 1 %e A124757 0 1 2 3 %t A124757 Table[Total[Most[Join@@Position[Reverse[IntegerDigits[n,2]],1]]],{n,30}] %Y A124757 Cf. A066099, A070939, A029931, A011782 (row lengths), A001788 (row sums). %Y A124757 Row sums of A048793 if we delete the last part of every row. %Y A124757 For prime indices instead of standard comps we have A359674, rev A359677. %Y A124757 Positions of first appearances are A359756. %Y A124757 A003714 lists numbers with no successive binary indices. %Y A124757 A030190 gives binary expansion, reverse A030308. %Y A124757 A230877 adds up positions of 1's in binary expansion, length A000120. %Y A124757 A359359 adds up positions of 0's in binary expansion, length A023416. %Y A124757 Cf. A059015, A065359, A069010, A073642, A083652, A359400, A359402, A359678. %K A124757 nonn,easy,look,tabf %O A124757 0,7 %A A124757 _Franklin T. Adams-Watters_, Nov 06 2006