OFFSET
1,1
COMMENTS
The corresponding values of k are 1, 2, 12, 30, 44, ... (A156021).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
29 is a term since 2 + 2^2 + 2^3 + 2^4 - 1 = 29 and 2 + 2^2 + 2^3 + 2^4 + 1 = 31 are twin primes.
MATHEMATICA
lst={}; Do[p=(n^1+n^2+n^3+n^4); If[PrimeQ[p1=p-1]&&PrimeQ[p2=p+1], AppendTo[lst, p1]], {n, 8!}]; lst
Select[Table[n+n^2+n^3+n^4-1, {n, 1000}], AllTrue[{#, #+2}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 17 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Feb 01 2009
STATUS
approved