OFFSET
0,1
COMMENTS
If a(n)=1 then n is a Mersenne exponent (A000043). - Pierre CAMI, Apr 22 2013
From Pierre CAMI, Apr 03 2017: (Start)
Empirically, as N increases, (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} n) tends to log(2); this is consistent with the prime number theorem as the probability that x*2^n - 1 is prime is ~ 1/(n*log(2)) if n is large enough.
For n=1 to 10000, a(n)/n < 7.5.
a(n)*2^n - 1 and a(n)*2^n + 1 are twin primes for n = 1, 2, 6, 18, 22, 63, 211, 282, 546, 726, 1032, 1156, 1321, 1553, 2821, 4901, 6634, 8335, 8529; corresponding values of a(n) are 3, 1, 3, 3, 33, 9, 9, 165, 297, 213, 177, 1035, 1065, 291, 6075, 2403, 2565, 4737, 3975, 459. (End)
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.
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
EXAMPLE
a(10)=5 because 5*2^10-1 is prime but 1*2^10-1 and 3*2^10-1 are not.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernardo Boncompagni, Feb 13 2007
EXTENSIONS
More terms from Robert G. Wilson v, Feb 20 2007
STATUS
approved