login
A397305
Positive numbers m such that m - 2^k is composite for all k > 0 with 2^k < m.
5
8, 12, 14, 16, 20, 22, 24, 26, 28, 30, 32, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 127, 128, 132, 134, 136, 138, 140, 142, 144, 146, 148, 149
OFFSET
1,1
COMMENTS
Inspired by A039669 where "prime" is replaced here by "composite".
Subsequence of even terms correspond to {m = 2*s : 2*s <> 2^r+2} = A299174 \ {A052548 \ 3}.
Subsequence of odd terms are de Polignac numbers: A006285 \ {1}.
EXAMPLE
30 is a term as 30-2, 30-4, 30-8, 30-16, i.e., 28, 26, 22 and 14 are all composites.
127 is a term (least odd term) as 127-2, 127-4, 127-8, 127-16, 127-32, 127-64, i.e., 125, 123, 119, 111, 95 and 63 are all composites.
34 is not a term as 34-32 = 2 is prime.
MAPLE
with(numtheory):
Suite1 := proc(N)
local n, k, m, L, test;
L := [];
for n from 4 to N do
test := true;
k := 1;
while 2^k < n do
m := n - 2^k;
if isprime(m) then
test := false;
break;
end if;
k := k+1;
od;
if test then
L := [op(L), n];
end if;
od;
return L;
end proc:
Suite1(150);
MATHEMATICA
Select[Range[8, 200], AllTrue[# - 2^Range[IntegerLength[#-1, 2] - 1], CompositeQ] &] (* Paolo Xausa, Jul 21 2026 *)
PROG
(PARI) isok(m) = if (m>2, for (k=1, logint(m, 2), my(c); if (isprime(c=m-2^k) || (c==1), return(0))); 1); \\ Michel Marcus, Jun 22 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Jun 20 2026
STATUS
approved