login
Primes p such that p^5 + p^3 + p - 2 is prime.
1

%I #15 Dec 27 2014 04:05:15

%S 3,5,11,13,23,43,131,311,353,401,491,761,1051,1063,1091,1151,1201,

%T 1433,1523,1531,1723,1733,1811,1831,1951,1973,2053,2081,2221,2333,

%U 2543,2591,2621,2663,2953,2963,3191,3433,3571,3623,3643,3821,3911,4051,4273,4391,4973,5273,5393,5591,6101,6131,6173,6203,6263,6473

%N Primes p such that p^5 + p^3 + p - 2 is prime.

%H Abhiram R Devesh, <a href="/A243897/b243897.txt">Table of n, a(n) for n = 1..10000</a>

%e p = 3 is in this sequence because p^5 + p^3 + p - 2 = 271 (prime).

%e p = 5 is in this sequence because p^5 + p^3 + p - 2 = 3253 (prime).

%o (Python)

%o import sympy.ntheory as snt

%o p=1

%o while p>0:

%o ....p=snt.nextprime(p)

%o ....pp=p+(p**3)+(p**5)-2

%o ....if snt.isprime(pp) == True:

%o ........print(p,pp)

%K nonn,easy

%O 1,1

%A _Abhiram R Devesh_, Jun 14 2014