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!)
A238904 Smallest k such that 2^k + (2n+1) and (2n+1)*2^k + 1 are both prime, k <= n, or -1 if no such k exists. 2
0, 1, 1, 2, 1, 1, 2, 1, -1, 6, 1, -1, 2, 2, 1, -1, 6, 1, 2, 1, 1, 2, 9, -1, 2, 1, -1, 4, 2, -1, 12, 4, 1, 2, 1, 3, 6, 3, -1, 2, 1, -1, 4, 6, 9, 8, 2, 1, 2, 1, 3, -1, 1, -1, 6, 1, -1, 12, 6, 3, 12, 8, 1, 2, 3, 3, 4, 1, -1, -1, 3, -1, -1, 60, 3, 4, 2, 1, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
EXAMPLE
a(0) = 0 because 2^0 + (2*0+1) = 2 and (2*0+1)*2^0 + 1 = 2 are both prime.
MATHEMATICA
a[n_] := Catch@Block[{k=0}, While[k <= n, If[PrimeQ[2^k + 2*n + 1] && PrimeQ[(2*n + 1)*2^k + 1], Throw@k]; k++]; -1]; a/@ Range[0, 80] (* Giovanni Resta, Mar 15 2014 *)
CROSSREFS
Sequence in context: A291771 A186972 A053734 * A214501 A318665 A057856
KEYWORD
sign
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 16 04:38 EDT 2024. Contains 371696 sequences. (Running on oeis4.)