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.

Original entry on oeis.org

4, 8, 9, 16, 32, 49, 64, 128, 133, 256, 259, 512, 961, 1024, 2048, 2059, 2449, 3713, 4096, 4681, 4867, 6169, 6241, 8192, 8401, 8773, 9353, 10261, 10561, 12307, 12449, 16129, 16384, 16459, 16531, 16771, 18467, 20491, 24649, 24721, 24961, 25217
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 02 2003

Keywords

Comments

A000120(d)=constant for all d with 1
Are there terms with more than 2 distinct prime factors?
No terms with omega(n)>2 up to 10000000. - Michel Marcus, Jun 05 2013
From Robert Israel, Dec 01 2015: (Start)
The only term divisible by 3 is 9.
The terms divisible by 2 are 2^k for k > 1.
There are no terms divisible by 5. (End)

Examples

			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.
		

Crossrefs

Programs

  • Maple
    A000120:= proc(n) convert(convert(n,base,2),`+`) end proc:
    filter:= proc(n) local t,f;
    if isprime(n) then return false fi;
    if n::even then return evalb(n = 2^ilog2(n)) fi;
    if n mod 3 = 0 then return evalb(n = 9) fi;
    t:= A000120(n);
    for f in numtheory:-divisors(n) minus {1,n} do
      if A000120(f) <> t then return false fi;
    od;
    true
    end proc:
    select(filter, [$4..10^5]); # Robert Israel, Dec 01 2015
  • Mathematica
    dn1Q[n_]:=!PrimeQ[n]&&Length[Union[(DigitCount[#,2,1]&/@Rest[Divisors[ n]])]] == 1; Select[Range[26000],dn1Q] (* Harvey P. Dale, Oct 03 2013 *)
  • 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