A282194 a(n) = smallest positive k such that 2*n + 2^k + 1 is composite.
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
Offset: 0
Keywords
Examples
a(1) = 5 because 3 + 2^k is prime for 0 < k < 5 and 3 + 2^5 = 35 is composite.
Links
- Altug Alkan, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
spk[n_]:=Module[{k=1},While[!CompositeQ[2n+2^k+1],k++];k]; Array[spk,110,0] (* Harvey P. Dale, Apr 26 2017 *)
-
PARI
a(n) = my(k=1); while(isprime(2*n+2^k+1), k++); k;
Comments