The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A198291 Least k such that 2^x - k produces primes or negative values of primes for x=1..n and (possibly in absolute value) composite for x=n+1. 0
 0, 33, 111, 285, 1455, 10275, 21, 75, 45, 13573477665, 232317867705 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS All terms after the first seven are congruent to 15 mod 30. a(n) exists for every n under Dickson's conjecture. [Charles R Greathouse IV, Jan 30 2012] LINKS EXAMPLE There are some numbers (7, 9, 15, 21) for which both abs(2^1 - k) and abs(2^2 - k) are primes. Let k = 33, then 2^1 - 33 is -31, the negative of a prime. 2^2 - 33 is -29, the negative of a prime as well. The absolute value of 2^3 - 33 is composite, hence 33 is a term of the sequence. MATHEMATICA Table[k = 0; While[i = 1; While[i <= n && PrimeQ[2^i - k], i++]; i <= n || PrimeQ[2^i - k] || Abs[2^i - k] == 1, k++]; k, {n, 9}] PROG (PARI) /* Optimized version, starts from twin primes */ list(lim)=my(v=vector(50), least=2, k, p=2); forprime(q=3, lim, if(q-p>2, p=q; next, k=q+2; p=q); for(j=3, least, if(!isprime(abs(2^j-k)), next(2))); my(j=least+1); while(isprime(abs(2^j-k)), j++); if(abs(2^j-k)<2, next); j--; if(!v[j], v[j]=k; print("a("j") = "k); while(v[least], least++))); forstep(i=#v, 1, -1, if(v[i], v=vector(i, j, v[j]); break)); v \\ Charles R Greathouse IV, Jan 30 2012 CROSSREFS Cf. A008597. Sequence in context: A296125 A297429 A039520 * A044284 A044665 A140161 Adjacent sequences:  A198288 A198289 A198290 * A198292 A198293 A198294 KEYWORD more,nonn AUTHOR Arkadiusz Wesolowski, Jan 26 2012 EXTENSIONS a(10) from Charles R Greathouse IV, Jan 30 2012 a(11) from Charles R Greathouse IV, Jan 31 2012 STATUS approved

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

Last modified September 23 11:36 EDT 2021. Contains 347612 sequences. (Running on oeis4.)