A126717 Least odd k such that k*2^n-1 is prime.
3, 3, 1, 1, 3, 1, 3, 1, 5, 7, 5, 3, 5, 1, 5, 9, 17, 1, 3, 1, 17, 7, 33, 13, 39, 57, 11, 21, 27, 7, 213, 1, 5, 31, 3, 25, 17, 21, 3, 25, 107, 15, 33, 3, 35, 7, 23, 31, 5, 19, 11, 21, 65, 147, 5, 3, 33, 51, 77, 45, 17, 1, 53, 9, 3, 67, 63, 43, 63, 51, 27, 73, 5, 15, 21, 25, 3, 55, 47, 69
Offset: 0
Keywords
Examples
a(10)=5 because 5*2^10-1 is prime but 1*2^10-1 and 3*2^10-1 are not.
Links
- Pierre CAMI, Table of n, a(n) for n = 0..10000 (first 1000 terms from T. D. Noe)
- Ray Ballinger, Proth Search Page
- Poo-Sung Park, Multiplicative functions with f(p + q - n_0) = f(p) + f(q) - f(n_0), arXiv:2002.09908 [math.NT], 2020.
Programs
-
Mathematica
f[n_] := Block[{k = 1}, While[ !PrimeQ[k*2^n - 1], k += 2]; k]; Table[f@n, {n, 0, 80}] (* Robert G. Wilson v, Feb 20 2007 *)
-
PARI
a(n) = {my(k=1); while(!isprime(k*2^n - 1), k+=2); k}; \\ Indranil Ghosh, Apr 03 2017
-
Python
from sympy import isprime def a(n): k=1 while True: if isprime(k*2**n - 1): return k k+=2 print([a(n) for n in range(101)]) # Indranil Ghosh, Apr 03 2017
Formula
a(n) << 19^n by Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Dec 10 2013
Conjecture: a(n) = O(n log n). - Thomas Ordowski, Oct 15 2014
Extensions
More terms from Robert G. Wilson v, Feb 20 2007
Comments