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!)
A153352 K-bit primes p such that p-2^i and p+2^i are composite for 0<=i<=K-1. 5

%I #33 Jun 04 2023 11:41:13

%S 1973,3181,3967,4889,8363,8923,11437,12517,14489,19583,19819,21683,

%T 21701,21893,22147,22817,24943,27197,27437,28057,29101,34171,34537,

%U 34919,35201,35437,36151,38873,41947,42169,42533,42943,43103,43759

%N K-bit primes p such that p-2^i and p+2^i are composite for 0<=i<=K-1.

%C Sun showed that the sequence is of positive density in the primes; in particular, of relative density >= 7.9 * 10^-29 = 1/phi(66483034025018711639862527490).

%C Terry Tao gives this sequence explicitly (p. 1) and generalizes Sun's result.

%H Charles R Greathouse IV, <a href="/A153352/b153352.txt">Table of n, a(n) for n = 1..10000</a>

%H Fred Cohen and J. L. Selfridge, <a href="http://www.jstor.org/stable/2005463">Not every number is the sum or difference of two prime powers</a>, Math. Comput. 29 (1975), pp. 79-81.

%H Zhi-Wei Sun, <a href="http://www.ams.org/journals/proc/2000-128-04/S0002-9939-99-05502-1/home.html">On integers not of the form +-p^a +- q^b</a>, Proceedings of the American Mathematical Society 128:4 (2000), pp. 997-1002.

%H Terence Tao, <a href="http://arxiv.org/abs/0802.3361">A remark on primality testing and decimal expansions</a>, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413.

%H Terence Tao, <a href="http://terrytao.wordpress.com/2008/02/25/a-remark-on-primality-testing-and-the-binary-expansion/">A remark on primality testing and the binary expansion</a> (blog entry)

%e a(1)=1973 because 1973 has 11 bits, and 1973 +-1, 1973 +-2, 1973 +-4, 1973 +-8, 1973 +-16, 1973 +-32, 1973 +-64, 1973 +-128, 1973 +-256, 1973 +-512, and 1973 +-2^10 are all composite.

%t cmpQ[p_]:=Module[{c=2^Range[0,(IntegerLength[p,2]-1)]},AllTrue[Flatten[p+{c,-c}],CompositeQ]]; Select[Prime[Range[5000]],cmpQ] (* _Harvey P. Dale_, Jun 04 2023 *)

%o (PARI)f(p)={v=binary(p);k=#v;for(i=0,k-1,if(isprime(p+2^i)||isprime(p-2^i),return(0))); return(1)}; forprime(p=2, 43759,if(f(p),print1(p,", "))) \\ _Washington Bomfim_, Jan 18 2011

%Y Cf. A065092.

%Y Subsequence of A255967.

%K nonn,base

%O 1,1

%A _Charles R Greathouse IV_, Dec 24 2008

%E Edited by _Washington Bomfim_, Jan 18 2011

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 24 19:31 EDT 2024. Contains 371962 sequences. (Running on oeis4.)