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.

A326669 Numbers k such that the average position of the ones in the binary expansion of k is an integer.

This page as a plain text file.
%I A326669 #18 Jul 02 2021 03:37:07
%S A326669 1,2,4,5,7,8,10,14,16,17,20,21,27,28,31,32,34,35,39,40,42,49,54,56,57,
%T A326669 62,64,65,68,70,73,78,80,84,85,93,98,99,107,108,112,114,119,124,127,
%U A326669 128,130,133,136,140,141,146,147,155,156,160,161,167,168,170,175
%N A326669 Numbers k such that the average position of the ones in the binary expansion of k is an integer.
%C A326669 These are numbers whose exponents in their representation as a sum of distinct powers of 2 have integer average.
%e A326669 42 is in the sequence because 42 = 2^1 + 2^3 + 2^5 and the average of {1,3,5} is 3, an integer.
%t A326669 Select[Range[100],IntegerQ[Mean[Join@@Position[IntegerDigits[#,2],1]]]&]
%o A326669 (PARI) isok(m) = my(b=binary(m)); denominator(vecsum(Vec(select(x->(x==1), b, 1)))/hammingweight(m)) == 1; \\ _Michel Marcus_, Jul 02 2021
%Y A326669 Cf. A000120, A051293, A070939, A102627, A291165, A291166, A316413, A326622, A326668, A326672, A326673.
%K A326669 nonn,base
%O A326669 1,2
%A A326669 _Gus Wiseman_, Jul 17 2019