Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A113213
Smallest number m such that 2^n - m and 2^n + m are primes.
2
0, 1, 3, 3, 9, 3, 21, 15, 9, 15, 21, 3, 45, 135, 75, 15, 99, 93, 99, 315, 105, 105, 15, 75, 339, 117, 261, 183, 351, 453, 1281, 267, 675, 867, 819, 117, 69, 2343, 1995, 1005, 2949, 165, 741, 603, 315, 1287, 1629, 243, 519, 765, 165, 1233, 741, 1797, 339, 177
OFFSET
1,3
COMMENTS
For n>=3 all terms are multiples of 3.
Conjecture: a(n) = O(n^3). - Thomas Ordowski, Apr 20 2015
LINKS
P. Poplin, Table of n, a(n) for n = 0..10000 (Terms after 8025 correspond to Fermat and Lucas PRP.)
EXAMPLE
a(1)=0 because 2^1 +/- 0 are primes; a(2)=1 because 2^2 -/+ 1 are primes;
a(33)=675 because 2^33 +/- 675 are closest (to each other) primes.
MATHEMATICA
f[n_]:=Module[{a=2^n, i=1}, While[!PrimeQ[a+i]||!PrimeQ[a-i], i++]; i]; Join[{0}, Rest[Array[f, 80]]] (* Harvey P. Dale, Apr 25 2011 *)
PROG
(PARI) a(n) = my(m=0); while(!(isprime(2^n+m) && isprime(2^n-m)), m++); m; \\ Michel Marcus, Apr 20 2015
CROSSREFS
Sequence in context: A068219 A337461 A157031 * A088032 A348397 A066572
KEYWORD
nonn
AUTHOR
Zak Seidov, Jan 07 2006
STATUS
approved