cp's OEIS Frontend

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.

A326699 Numerator of the average position of a 1 in the reversed binary expansion of n.

This page as a plain text file.
%I A326699 #13 Oct 07 2019 18:44:29
%S A326699 1,2,3,3,2,5,2,4,5,3,7,7,8,3,5,5,3,7,8,4,3,10,11,9,10,11,3,4,13,7,3,6,
%T A326699 7,4,3,9,10,11,3,5,11,4,13,13,7,15,16,11,4,13,7,14,15,4,17,5,4,17,18,
%U A326699 9,19,4,7,7,4,9,10,5,11,4,13,11,4,13,7,14,15,4
%N A326699 Numerator of the average position of a 1 in the reversed binary expansion of n.
%H A326699 Robert Israel, <a href="/A326699/b326699.txt">Table of n, a(n) for n = 1..10000</a>
%e A326699 The sequence of fractions begins: 1, 2, 3/2, 3, 2, 5/2, 2, 4, 5/2, 3, 7/3, 7/2, 8/3, 3, 5/2, 5, 3, 7/2, 8/3, 4.
%e A326699 For example, the reversed binary expansion of 18 is (0,1,0,0,1), and the average of {2,5} is 7/2, so a(18) = 7.
%p A326699 f:= proc(n) local L;
%p A326699   L:= convert(n,base,2);
%p A326699   L:= select(t -> L[t]=1, [$1..nops(L)]);
%p A326699   numer(convert(L,`+`)/nops(L))
%p A326699 end proc:
%p A326699 map(f, [$1..100]); # _Robert Israel_, Oct 07 2019
%t A326699 Table[Numerator[Mean[Join@@Position[Reverse[IntegerDigits[n,2]],1]]],{n,100}]
%Y A326699 Cf. A000120, A029931, A035327, A048793, A070939, A291166, A295235, A326669, A326674, A326700 (denominators).
%K A326699 nonn,frac,look
%O A326699 1,2
%A A326699 _Gus Wiseman_, Jul 20 2019