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.

A354722 Composite numbers whose divisors have distinct binary weights (A000120).

This page as a plain text file.
%I A354722 #15 Jun 08 2022 03:22:05
%S A354722 25,39,55,57,69,87,95,111,115,119,121,123,125,141,145,159,169,177,183,
%T A354722 185,187,201,203,205,213,215,219,221,235,237,249,253,265,289,291,299,
%U A354722 301,303,305,319,321,323,329,335,339,355,361,365,371,377,391,393,411,413
%N A354722 Composite numbers whose divisors have distinct binary weights (A000120).
%C A354722 Without the restriction of composite numbers, 1 and all the odd primes would have been terms of this sequence.
%C A354722 Since 1 and 2 have the same binary weight, all the terms are odd.
%H A354722 Amiram Eldar, <a href="/A354722/b354722.txt">Table of n, a(n) for n = 1..10000</a>
%e A354722 25 is a term since its divisors, 1, 5 and 25, have binary weights 1, 2 and 3, respectively.
%e A354722 55 is a term since its divisors, 1, 5, 11 and 55, have binary weights 1, 2, 3 and 5, respectively.
%t A354722 bw[n_] := DigitCount[n, 2, 1]; q[n_] := CompositeQ[n] && UnsameQ @@ (bw /@ Divisors[n]); Select[Range[1, 400, 2], q]
%o A354722 (Python)
%o A354722 from sympy import divisors
%o A354722 def binwt(n): return bin(n).count("1")
%o A354722 def ok(n):
%o A354722     binwts, divs = set(), 0
%o A354722     for d in divisors(n, generator=True):
%o A354722         b = binwt(d)
%o A354722         if b in binwts: return False
%o A354722         binwts.add(b)
%o A354722         divs += 1
%o A354722     return divs > 2
%o A354722 print([k for k in range(415) if ok(k)]) # _Michael S. Branicky_, Jun 04 2022
%o A354722 (PARI) isok(c) = {if ((c>1) && !isprime(c), my(d=divisors(c)); #Set(apply(hammingweight, d)) == #d;);} \\ _Michel Marcus_, Jun 04 2022
%Y A354722 Cf. A000120, A027750.
%Y A354722 Subsequences: A255401 and A354724.
%K A354722 nonn,base
%O A354722 1,1
%A A354722 _Amiram Eldar_, Jun 04 2022