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.

A089042 Composite numbers such that all divisors >1 have the same number of 1's in binary representation.

This page as a plain text file.
%I A089042 #20 Jan 14 2024 12:38:08
%S A089042 4,8,9,16,32,49,64,128,133,256,259,512,961,1024,2048,2059,2449,3713,
%T A089042 4096,4681,4867,6169,6241,8192,8401,8773,9353,10261,10561,12307,12449,
%U A089042 16129,16384,16459,16531,16771,18467,20491,24649,24721,24961,25217
%N A089042 Composite numbers such that all divisors >1 have the same number of 1's in binary representation.
%C A089042 A000120(d)=constant for all d with 1<d<=a(n) and d|a(n).
%C A089042 Are there terms with more than 2 distinct prime factors?
%C A089042 No terms with omega(n)>2 up to 10000000. - _Michel Marcus_, Jun 05 2013
%C A089042 From _Robert Israel_, Dec 01 2015: (Start)
%C A089042 The only term divisible by 3 is 9.
%C A089042 The terms divisible by 2 are 2^k for k > 1.
%C A089042 There are no terms divisible by 5. (End)
%H A089042 Harvey P. Dale and Robert Israel, <a href="/A089042/b089042.txt">Table of n, a(n) for n = 1..1000</a> (a(1) to a(100) from Harvey P. Dale)
%e A089042 Divisors >1 of 259: 7, 37 and 259, which have all three 1's in binary: 7->'111', 37->'100101' and 259->'100000011', therefore 259 is a term.
%p A089042 A000120:= proc(n) convert(convert(n,base,2),`+`) end proc:
%p A089042 filter:= proc(n) local t,f;
%p A089042 if isprime(n) then return false fi;
%p A089042 if n::even then return evalb(n = 2^ilog2(n)) fi;
%p A089042 if n mod 3 = 0 then return evalb(n = 9) fi;
%p A089042 t:= A000120(n);
%p A089042 for f in numtheory:-divisors(n) minus {1,n} do
%p A089042   if A000120(f) <> t then return false fi;
%p A089042 od;
%p A089042 true
%p A089042 end proc:
%p A089042 select(filter, [$4..10^5]); # _Robert Israel_, Dec 01 2015
%t A089042 dn1Q[n_]:=!PrimeQ[n]&&Length[Union[(DigitCount[#,2,1]&/@Rest[Divisors[ n]])]] == 1; Select[Range[26000],dn1Q] (* _Harvey P. Dale_, Oct 03 2013 *)
%o A089042 (PARI) isok(n) = {if (isprime(n) || n==1, return (0), my(nb = norml2(binary(n))); fordiv(n, d, if (d!=1 && norml2(binary(d)) != nb, return (0))); return (1););}  \\ _Michel Marcus_, Jun 05 2013
%Y A089042 Cf. A007088, A002808.
%K A089042 nonn,base
%O A089042 1,1
%A A089042 _Reinhard Zumkeller_, Dec 02 2003