login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A214862
Smallest odd prime p such that 4^n - p*2^n - 1 is prime.
1
3, 5, 11, 5, 11, 17, 7, 5, 13, 43, 19, 11, 11, 19, 41, 7, 61, 67, 13, 31, 11, 43, 37, 101, 13, 17, 11, 67, 73, 13, 101, 13, 11, 137, 11, 31, 101, 23, 97, 11, 47, 53, 53, 17, 41, 139, 157, 7, 67, 47, 239, 127, 41, 197, 53, 13, 31, 127, 71, 191, 97, 709, 101, 41
OFFSET
2,1
COMMENTS
The average of the ratio (a(n)/log(a(n)))/n for n = 2 to N tends to 0.35 as N increases.
For n <= 2000, 709 terms a(n) are <= n.
EXAMPLE
Since 4^3 - 5*2^3 - 1 = 23 is prime, a(3) = 5.
MATHEMATICA
sop[n_]:=Module[{c4=4^n-1, c2=2^n, i=3}, While[!PrimeQ[c4-i*c2], i= NextPrime[ i]]; i]; Array[sop, 70, 2] (* Harvey P. Dale, Oct 28 2013 *)
PROG
(PFGW Scriptify)
SCRIPT
DIM n, 1
DIM k
DIMS t
LABEL a
SET n, n+1
IF n>2000 THEN END
SET k, 1
LABEL b
SET k, k+1
SETS t, %d, %d\,; k; n
PRP 4^n-p(k)*2^n-1, t
IF ISPRP THEN GOTO a
GOTO b
(PARI)
N=10^6; default(primelimit, N);
a(n) = {
my(n4=4^n, n2=2^n);
forprime (p=3, N,
if ( isprime(n4-p*n2-1), return(p) )
);
return(-1);
} /* Joerg Arndt, Mar 11 2013 */
CROSSREFS
Sequence in context: A258862 A139430 A143386 * A151885 A137656 A046228
KEYWORD
nonn
AUTHOR
Pierre CAMI, Mar 09 2013
STATUS
approved