%I #21 Jan 12 2023 01:38:56
%S 2,3,4,5,7,8,11,13,16,17,19,23,27,29,31,32,37,41,43,47,53,54,59,61,63,
%T 64,67,71,73,79,83,89,97,101,103,107,108,109,113,125,126,127,128,131,
%U 137,139,149,151,157,163,167,173,175,179,181,191,193,197,199,211,216,223,227,229,233,239,241,243,245,251,252,256
%N A positive integer k is included if, when k is represented in binary, it contains the binary representation of every distinct prime dividing k as substrings, without overlapping of the substrings.
%C Includes all primes and powers of 2, but no even semiprimes except 4. Contains p^2 for primes p in A018826. - _Robert Israel_, Jan 10 2023
%C Contains no squarefree numbers except primes. - _Robert Israel_, Jan 12 2023
%H Robert Israel, <a href="/A162721/b162721.txt">Table of n, a(n) for n = 1..10000</a>
%e 20 in binary is 10100. The distinct primes dividing 20 are 2 and 5, which are 10 and 101 in binary. Both 10 and 101 occur in 10100, but with overlapping. So 20 is not in this sequence. However, 54 in binary is 110110. 54 is divisible by 2 and 3, which are 10 and 11 in binary. Both 10 and 11 occur in 110110 without overlapping. (1{10}{11}0.) So 54 is in this sequence.
%p # Requires Maple 2018 or later
%p satfilter:= proc(n) local n2, P, nP, X, P2, J, Cons, Clause, i,j,k, Ck;
%p n2:= convert(n,base,2);
%p P:= numtheory:-factorset(n);
%p nP:= nops(P);
%p P2:= map(convert,P,base,2);
%p J:= map(t -> map(s -> [$s..s+nops(t)-1],select(i -> n2[i..i+nops(t)-1] = t, [$1..nops(n2)+1-nops(t)])), P2);
%p if member([],J) then return false fi;
%p Cons:= true;
%p for i from 1 to nops(J) do
%p Clause:= X[i,J[i][1]];
%p for j from 2 to nops(J[i]) do
%p Clause:= Clause &or X[i,J[i][j]]
%p od;
%p Cons:= Cons &and Clause;
%p od;
%p for k from 1 to nops(n2) do
%p Ck:= {};
%p for i from 1 to nP do
%p for j from 1 to nops(J[i]) do if member(k,J[i,j]) then Ck:= Ck union {X[i,J[i,j]]} fi od od;
%p if nops(Ck) >= 2 then for i from 2 to nops(Ck) do for j from 1 to i-1 do Cons:= Cons &and (¬(Ck[i]) &or ¬(Ck[j])) od od fi;
%p od:
%p Logic:-Satisfiable(Cons);
%p end proc:
%p select(satfilter, [$2..1000]); # _Robert Israel_, Jan 10 2023
%Y Cf. A018826, A162722.
%K base,nonn
%O 1,1
%A _Leroy Quet_, Jul 11 2009
%E More terms from _Sean A. Irvine_, Dec 09 2010
|