OFFSET
1,1
COMMENTS
Corresponding numbers k such that a(n)^n = p(k) + p(k+1) + p(k+2) are given by A157197.
It is not known if a(n) exists for all n.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..100
FORMULA
For m = (p^n)/3 (not an integer), if q,r are largest primes and s,t are smallest primes such that q < r < m < s < t, then p^n must equal either q+r+s or r+s+t. - Robert G. Wilson v
EXAMPLE
a(1) = 23 because A070934(1) = p(3) + p(4) + p(5) = 5 + 7 + 11 = 23 is prime, but p(1) + p(2) + p(3) = 2 + 3 + 5 = 10 is composite and p(2) + p(3) + p(4) = 3 + 5 + 7 = 15 is composite.
a(2) = 7 because A122654(1) = 7 is prime and p(6) + p(7) + p(8) = 13 + 17 + 19 = 49 = 7^2, but p(k) + p(k+1) + p(k+2) are not squares for 0 < k < 6.
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[n_] := Block[{p = If[n < 2, 5, 3]}, While[r = PrevPrim@ Floor[p^n/3]; q = PrevPrim@r; s = NextPrim@r; t = NextPrim@s; p^n != q + r + s && p^n != r + s + t, p = NextPrim@p]; p]; Array[f, 50] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Sep 24 2006
EXTENSIONS
a(5)-a(50) from Robert G. Wilson v, Sep 26 2006
STATUS
approved