login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236940 Primes p such that p^4-p+1 is prime. 2

%I

%S 3,13,19,43,79,109,313,379,613,709,1171,1213,1399,1543,1693,1759,1861,

%T 1933,2089,2239,2341,2371,2503,2521,2731,2749,3001,3061,3229,3433,

%U 3571,3739,3769,4219,4801,4933,4951,4993,5011,5023,5209,5281

%N Primes p such that p^4-p+1 is prime.

%C Primes in the sequence A236761.

%H Vincenzo Librandi, <a href="/A236940/b236940.txt">Table of n, a(n) for n = 1..1000</a>

%e 1213 is prime and 1213^4 - 1213 + 1 = 2164926732949 is prime. Thus, 1213 is a member of this sequence.

%t Select[Prime[Range[10000]], PrimeQ[#^4 - # + 1]&] (* _Vincenzo Librandi_, Feb 14 2014 *)

%o (Python)

%o import sympy

%o from sympy import isprime

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

%o (PARI)

%o s=[]; forprime(p=2, 6000, if(isprime(p^4-p+1), s=concat(s, p))); s \\ _Colin Barker_, Feb 05 2014

%o (MAGMA) [p: p in PrimesUpTo(6000) | IsPrime(p^4-p+1)]; // _Vincenzo Librandi_, Feb 14 2014

%Y Cf. A236761.

%K nonn

%O 1,1

%A _Derek Orr_, Feb 01 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 15:15 EDT 2021. Contains 346428 sequences. (Running on oeis4.)