OFFSET
1,1
COMMENTS
If n mod 6 = 1, both p and q must be 2, and a(n)=0 if n + 4 is not a prime. The values of a(n) for n=257,297,353,383,557 are either greater than 176 000 or 0. Several large entries: a(87) = 2^25633 + 87, a(717) = 2^3217 + 717, a(773) = 2^2539 + 773, a(927) = 2^1117 + 927.
EXAMPLE
a(1)=5 because 5=2^2+1 is the smallest prime of the form p^q+1. a(2)=11 because 11=3^2+2. a(3)=7, because 7=2^2+3. a(17)=8209, because 8209=2^13+17. a(31)=0, because p^q+31 cannot be a prime.
MATHEMATICA
For[l = {}; n = 1, n <= 70, n++, found = False; If[Mod[n, 2] == 0, For[rm = Infinity; i = 1, i < 100, i++, For[j = 1, j < 100, j++, p = Prime[i]; q = Prime[j]; r = p^q + n; If[r >= rm, Break[], If[PrimeQ[r], rm = r; found = True]]; ]; ], (* if n is odd, r=2^q+n *) If[Mod[n, 6] == 1, r = 4 + n; If[PrimeQ[r], found = True], For[j = 1, j < 1000, j++, q = Prime[j]; r = 2^q + n; If[PrimeQ[r], found = True; rm = r; Break[]]; ]; ]; ]; If[ ! found, rm = 0]; l = Append[l, rm]; ]; l
CROSSREFS
KEYWORD
nonn
AUTHOR
Cheng Zhang (cz1(AT)rice.edu), Jan 28 2010, Mar 02 2010
STATUS
approved