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.

A180059 Smallest k such that binary weight of k*n is less than binary weight of k, or zero if no such k exists (for n = powers of 2).

This page as a plain text file.
%I A180059 #12 Oct 24 2013 16:33:23
%S A180059 0,0,11,0,13,11,23,0,29,13,47,11,79,23,47,0,61,29,27,13,55,47,23,11,
%T A180059 41,79,19,23,53,47,95,0,125,61,59,29,111,27,55,13,25,55,143,47,47,23,
%U A180059 47,11,209,41,91,79,29,19,149,23,575,53,139,47,277,95,191,0,253,125,107,61
%N A180059 Smallest k such that binary weight of k*n is less than binary weight of k, or zero if no such k exists (for n = powers of 2).
%H A180059 Charles R Greathouse IV, <a href="/A180059/b180059.txt">Table of n, a(n) for n = 1..10000</a>
%F A180059 A000120(n) > A000120(k*n).
%t A180059 s={};Do[Do[If[Count[IntegerDigits[k x,2],1]<Count[IntegerDigits[x,2],1],
%t A180059 AppendTo[s,{k,x}];Break[]],{x,10000}],{k,2,200}];s (* _Zak Seidov_, Oct 24 2013 *)
%o A180059 (PARI) a(n)=if((n<=1)||((n>>valuation(n, 2))==1), 0, my(k=3); while(hammingweight(k*n)>=hammingweight(k), k+=2); k ) \\ _Charles R Greathouse IV_, Oct 19 2013
%Y A180059 Cf. A000120, A180054, A180055.
%K A180059 base,nonn
%O A180059 1,3
%A A180059 _Zak Seidov_, Aug 08 2010