The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #44 Sep 08 2022 08:46:19

%S 3,5,17,29,41,53,59,65,89,97,119,137,163,179,185,191,193,209,217,219,

%T 221,223,233,239,247,253,269,281,305,307,311,343,359,389,403,407,415,

%U 419,427,431,457,491,505,521,533,545,547,557,569,575,581,583,597,613,637

%N Odd numbers which are uniquely decomposable into the sum of a prime and a power of two.

%C It is conjectured that none of these numbers is in A101036.

%C A positive integer n belongs to this sequence if n is of the form x*y + x - 1 and for some m >= 1:

%C 1) y = -1 + 2 * Product_{k=0..m} (2^(2^k) + 1),

%C 2) x <= 2^(2^(m+1) - 1),

%C 3) n - 2^(2^(m+1)) is prime.

%C Odd numbers m that satisfy A109925(m) = 1. - _Michel Marcus_, Mar 19 2017

%H Robert G. Wilson v, <a href="/A283806/b283806.txt">Table of n, a(n) for n = 1..1000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Prime_number">Prime number</a>

%F a(n) ~ 10*(n + n/log(n)).

%e 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.

%t 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 *)

%o (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;

%o (PARI) isok(n) = (n % 2) && (sum(k=0, log(n)\log(2), isprime(n-2^k)) == 1); \\ _Michel Marcus_, Mar 18 2017

%o (Python)

%o from sympy import isprime

%o import math

%o 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

%Y Cf. A000215, A109925.

%K nonn,easy

%O 1,1

%A _Arkadiusz Wesolowski_, Mar 17 2017

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 May 14 17:00 EDT 2024. Contains 372533 sequences. (Running on oeis4.)