login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282194 a(n) = smallest positive k such that 2*n + 2^k + 1 is composite. 1
3, 5, 2, 1, 4, 2, 1, 7, 2, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 4, 2, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 3, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 4, 2, 1, 4, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 4, 2, 1, 3, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Least k such that a(k) = n are 3, 2, 0, 4, 1, 112, 7, 32917, 802, 9712, 1198673602 for the initial terms.

LINKS

Altug Alkan, Table of n, a(n) for n = 0..10000

EXAMPLE

a(1) = 5 because 3 + 2^k is prime for 0 < k < 5 and 3 + 2^5 = 35 is composite.

MATHEMATICA

spk[n_]:=Module[{k=1}, While[!CompositeQ[2n+2^k+1], k++]; k]; Array[spk, 110, 0] (* Harvey P. Dale, Apr 26 2017 *)

PROG

(PARI) a(n) = my(k=1); while(isprime(2*n+2^k+1), k++); k;

CROSSREFS

Cf. A067076, A067760, A153238, A282026.

Sequence in context: A197521 A161865 A145325 * A126353 A094791 A243524

Adjacent sequences:  A282191 A282192 A282193 * A282195 A282196 A282197

KEYWORD

nonn

AUTHOR

Altug Alkan, Feb 15 2017

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 19 07:39 EST 2018. Contains 299330 sequences. (Running on oeis4.)