login
Numbers n such that n^4 + n + 1 and n^4 - n - 1 are prime.
1

%I #7 Jan 19 2014 04:45:06

%S 2,5,6,9,11,26,44,60,77,147,239,384,545,690,770,779,1071,1127,1190,

%T 1271,1296,1331,1506,1659,1707,1871,1880,1986,2037,2442,2520,2541,

%U 2714,2960,2982,3045,3060,3110,3189,3287,3464,3609

%N Numbers n such that n^4 + n + 1 and n^4 - n - 1 are prime.

%e 384^4 + 384 + 1 and 384^4 - 384 - 1 are both prime, so 384 is a member of this sequence.

%o (Python)

%o import sympy

%o from sympy import isprime

%o {print(p) for p in range(10**4) if isprime(p**4-p-1) and isprime(p**4+p+1)}

%o (PARI)

%o s=[]; for(n=1, 4000, if(isprime(n^4+n+1) && isprime(n^4-n-1), s=concat(s, n))); s \\ _Colin Barker_, Jan 19 2014

%Y Numbers in both A126424 and A049408.

%K nonn

%O 1,1

%A _Derek Orr_, Jan 19 2014