login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236760 Numbers n such that n^4 + n +- 1 are twin primes. 2
2, 6, 9, 12, 26, 44, 72, 77, 119, 204, 266, 290, 351, 506, 539, 542, 561, 644, 741, 807, 861, 924, 992, 996, 1016, 1032, 1049, 1356, 1412, 1556, 1640, 1794, 1847, 1862, 1871, 1895, 1980, 2036, 2129, 2222, 2289, 2354, 2445, 2616, 2630 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
992^4 + 992 + 1 (968381957089) and 992^4 + 992 - 1 (968381957087) are twin primes. Thus, 992 is a member of this sequence.
MATHEMATICA
Select[Range[3000], PrimeQ[#^4 + # - 1] && PrimeQ[#^4 + # + 1] &] (* Vincenzo Librandi, Dec 26 2015 *)
Select[Range[3000], AllTrue[#^4+#+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 13 2017 *)
PROG
(Python)
import sympy
from sympy import isprime
{print(n) for n in range(10**4) if isprime(n**4+n-1) and isprime(n**4+n+1)}
(PARI)
s=[]; for(n=1, 3000, if(isprime(n^4+n+1)&&isprime(n^4+n-+1), s=concat(s, n))); s \\ Colin Barker, Jan 31 2014
(Magma) [n: n in [1..5*10^3] |IsPrime(n^4+n-1) and IsPrime(n^4 +n+1)]; // Vincenzo Librandi, Dec 26 2015
CROSSREFS
Intersection of A236759 and A049408.
Sequence in context: A293789 A112870 A169915 * A086562 A083789 A003145
KEYWORD
nonn,easy
AUTHOR
Derek Orr, Jan 30 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)