login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of bits in binary expansion of A294994(n).
3

%I #8 May 27 2018 17:08:16

%S 2,2,3,3,4,4,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,

%T 8,8,8,8,8,8,8,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,

%U 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10

%N Number of bits in binary expansion of A294994(n).

%H Rémy Sigrist, <a href="/A303594/b303594.txt">Table of n, a(n) for n = 1..10000</a>

%o (PARI) s = 0; v = 2; for (n=1, 101, print1 (#binary(v) ", "); s += 2^v; forprime (p=2, oo, if (!bittest(s, p) && hammingweight(bitxor(p, v))<=2, v = p; break))) \\ _Rémy Sigrist_, May 27 2018

%Y Cf. A035100, A294994, A303593.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, May 27 2018