OFFSET
1,1
COMMENTS
It is conjectured that none of these numbers is in A101036.
A positive integer n belongs to this sequence if n is of the form x*y + x - 1 and for some m >= 1:
1) y = -1 + 2 * Product_{k=0..m} (2^(2^k) + 1),
2) x <= 2^(2^(m+1) - 1),
3) n - 2^(2^(m+1)) is prime.
Odd numbers m that satisfy A109925(m) = 1. - Michel Marcus, Mar 19 2017
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
Wikipedia, Prime number
FORMULA
a(n) ~ 10*(n + n/log(n)).
EXAMPLE
17 is in the sequence since 17 - 2^2 = 13 is a prime and 17 - 2^0 = 16, 17 - 2^1 = 15, 17 - 2^3 = 9, 17 - 2^4 = 1 are all nonprimes.
MATHEMATICA
Select[Range[1, 640, 2], Function[n, Total@ Boole@ PrimeQ@ Map[n - # &, 2^Range[0, Floor@ Log2@ n]] == 1]] (* Michael De Vlieger, Mar 18 2017 *)
PROG
(Magma) lst:=[]; for n in [1..637 by 2] do c:=0; r:=Floor(Log(n)/Log(2)); for x in [0..r] do a:=n-2^x; if IsPrime(a) then c+:=1; end if; if c eq 2 then break; end if; end for; if c eq 1 then Append(~lst, n); end if; end for; lst;
(PARI) isok(n) = (n % 2) && (sum(k=0, log(n)\log(2), isprime(n-2^k)) == 1); \\ Michel Marcus, Mar 18 2017
(Python)
from sympy import isprime
import math
print([n for n in range(1001) if n%2 and sum([isprime(n-2**k) for k in range(int(math.floor(math.log(n)/math.log(2))) + 1)]) == 1]) # Indranil Ghosh, Mar 29 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Arkadiusz Wesolowski, Mar 17 2017
STATUS
approved