login
Nonprimes with no divisors >1 that are prefixes of other divisors in binary representation.
2

%I #12 Dec 16 2021 07:35:14

%S 1,9,25,33,35,49,65,69,77,91,121,125,129,133,141,143,145,155,161,169,

%T 209,247,259,265,267,287,289,295,299,301,305,319,323,329,341,343,361,

%U 371,377,391,395,403,407,437,451,473,481,485,493,505,515,519,527,529,533

%N Nonprimes with no divisors >1 that are prefixes of other divisors in binary representation.

%C A090332 without primes.

%C Includes all members of A001248 except 4. - _Robert Israel_, Jul 08 2020

%H Robert Israel, <a href="/A090333/b090333.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local d, i,j;

%p if isprime(n) then return false fi;

%p d:= numtheory:-divisors(n);

%p for i in d do

%p for j from 1 to ilog2(i)-1 do

%p if member(floor(i/2^j), d) then return false fi

%p od od;

%p true

%p end proc:

%p select(filter, [seq(i,i=1..1000,2)]); # _Robert Israel_, Jul 08 2020

%t filterQ[n_] := If[PrimeQ[n], False, Catch@Module[{d = Divisors[n], j}, Do[For[j = 1, j <= Floor@Log[2, i]-1, j++, If[MemberQ[d, Floor[i/2^j]], Throw[False]]], {i, d}]; True]];

%t Select[Range[1000], filterQ] (* _Jean-François Alcover_, Dec 16 2021, after _Robert Israel_ *)

%Y Cf. A001248, A090332.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Nov 26 2003

%E Missing term 121 inserted by _Robert Israel_, Jul 08 2020