A264097 Smallest odd number k divisible by 3 such that k*2^n-1 is a prime.
3, 3, 3, 3, 3, 15, 3, 3, 27, 45, 15, 3, 87, 9, 15, 9, 45, 15, 3, 51, 57, 9, 33, 69, 39, 57, 57, 21, 27, 45, 213, 15, 57, 147, 3, 33, 45, 21, 3, 63, 117, 15, 33, 3, 57, 165, 33, 213, 117, 69, 87, 21, 183, 147, 45, 3, 33, 51, 111, 45, 93, 69, 57, 9, 3, 99, 63
Offset: 0
Keywords
Examples
3*2^0-1=2 prime so a(0)=3. 3*2^1-1=5 prime so a(1)=3. 3*2^2-1=11 prime so a(2)=3. 3*2^3-1=23 prime so a(3)=3.
Links
- Pierre CAMI, Table of n, a(n) for n = 0..31000
Programs
-
Mathematica
Table[k = 3; While[! PrimeQ[k 2^n - 1], k += 6]; k, {n, 0, 68}] (* Michael De Vlieger, Nov 03 2015 *)
-
PARI
a(n) = {k = 3; while (!isprime(k*2^n-1), k += 6); k;} \\ Michel Marcus, Nov 03 2015
Comments