login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283806 Odd numbers which are uniquely decomposable into the sum of a prime and a power of two. 1
3, 5, 17, 29, 41, 53, 59, 65, 89, 97, 119, 137, 163, 179, 185, 191, 193, 209, 217, 219, 221, 223, 233, 239, 247, 253, 269, 281, 305, 307, 311, 343, 359, 389, 403, 407, 415, 419, 427, 431, 457, 491, 505, 521, 533, 545, 547, 557, 569, 575, 581, 583, 597, 613, 637 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A079373 A181291 A038703 * A163586 A074931 A023226
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)