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!)
A188903 a(n) is the least power of 2 such that 2n+1 - a(n) is prime, or 0 if no such prime exists. 3
0, 1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 16, 2, 2, 4, 8, 2, 4, 2, 2, 4, 2, 4, 16, 2, 4, 16, 2, 2, 4, 8, 2, 4, 2, 2, 4, 8, 2, 4, 2, 4, 16, 2, 4, 16, 8, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 16, 8, 16, 16, 0, 2, 4, 2, 4, 64, 2, 2, 4, 8, 8, 0, 2, 2, 4, 8, 2, 4, 32, 2, 4, 2, 4, 16, 2, 4, 16, 2, 2, 4, 8, 8, 64, 2, 2, 4, 2, 2, 4, 8, 8, 16, 32, 2, 4, 128, 8, 64, 32, 2, 4, 2, 2, 4, 2, 4, 16, 2, 2, 4, 8, 8, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The second Polignac's Conjecture states that every odd positive integer is the sum of a prime and a power of two. This conjecture was proved false, and the smallest counterexample is 127 because subtracting powers of 2 from 127 produces the composite numbers 126, 123, 119, 111, 95, and 63.
The sequence A006285 gives the odd numbers for which the conjecture fails. Hence, a(n) = 0 for n = (A006285(k)-1)/2 = {0, 63, 74, 125, 165, 168, 186, ...}.
REFERENCES
David Wells, Prime Numbers: The Most Mysterious Figures In Math, John Wiley & Sons, 2005, p. 175-176.
LINKS
Carlos Rivera, Puzzle 219, Polignac numbers, The Prime Puzzles and Problems Connection.
EXAMPLE
a(1) = 1 because 2*1 + 1 = 3 = 1 + 2 ;
a(2) = 2 because 2*2 + 1 = 5 = 2 + 3 ;
a(3) = 2 because 2*3 + 1 = 7 = 2 + 5 ;
a(63) = 0 ; a(74) = 0 ; a(125) = 0, ....
MAPLE
with(numtheory):for n from 1 to 126 do:x:=2*n+1:id:=0:for k from 0 to 50 while(id=0)
do: for q from 1 to 100 while(id=0) do: p:=ithprime(q): y:=2^k+p:if y=x then
id:=1:printf(`%d, `, 2^k):else fi:od:od:if id=0 then printf(`%d, `, 0):else fi:od:
MATHEMATICA
Table[d = 2*n + 1; k = 1; While[k < d && ! PrimeQ[d - k], k = 2*k]; If[k < d, k, 0], {n, 0, 126}]
PROG
(Sage)
def A188903(n):
return next((2**k for k in (0..floor(log(2*n+1, 2))) if is_prime(2*n+1-2**k)), 0)
# D. S. McNeil, Apr 14 2011
CROSSREFS
Cf. A065381 (primes not of the form p + 2^k, p prime and k >= 0), A156695.
Sequence in context: A367626 A049716 A361289 * A366534 A066671 A159802
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 13 2011
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 March 1 06:09 EST 2024. Contains 370430 sequences. (Running on oeis4.)