|
|
A118957
|
|
Numbers of the form 2^k + p, where p is a prime less than 2^k.
|
|
4
|
|
|
6, 7, 10, 11, 13, 15, 18, 19, 21, 23, 27, 29, 34, 35, 37, 39, 43, 45, 49, 51, 55, 61, 63, 66, 67, 69, 71, 75, 77, 81, 83, 87, 93, 95, 101, 105, 107, 111, 117, 123, 125, 130, 131, 133, 135, 139, 141, 145, 147, 151, 157, 159, 165, 169, 171, 175, 181, 187, 189, 195, 199
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MAPLE
|
isA118957 := proc(n)
local twok, p ;
twok := 1 ;
while twok < n-1 do
p := n-twok ;
if isprime(p) and p < twok then
return true;
end if;
twok := twok*2 ;
end do:
return false;
end proc:
for n from 1 to 200 do
if isA118957(n) then
printf("%d, ", n) ;
end if;
|
|
MATHEMATICA
|
okQ[n_] := Module[{k, p}, For[k = Ceiling[Log[2, n]], k>1, k--, p = n-2^k; If[2 <= p < 2^k && PrimeQ[p], Return[True]]]; False]; Select[Range[200], okQ] (* Jean-François Alcover, Mar 11 2019 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|