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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A236526 Numbers k such that k^3 + k +- 1 are twin primes. 2
 3, 15, 18, 21, 39, 87, 117, 120, 135, 243, 360, 366, 381, 426, 429, 615, 642, 723, 879, 1002, 1023, 1170, 1173, 1224, 1458, 1506, 1518, 1530, 1731, 1896, 1920, 1965, 2007, 2025, 2058, 2133, 2160, 2376, 2379, 2382, 2406, 2553, 2577, 2673, 2703, 2727 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The only prime in this sequence is a(1) = 3. LINKS Amiram Eldar, Table of n, a(n) for n = 1..10000 EXAMPLE 381^3 + 381 +- 1 (55305961 and 55305959, respectively) are both prime. Thus, 381 is a member of this sequence. MATHEMATICA Select[Range[3000], PrimeQ[#^3 + # - 1] && PrimeQ[#^3 + # + 1] &] (* Vincenzo Librandi, Dec 26 2015 *) Select[Range[3000], AllTrue[#^3+#+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 23 2020 *) PROG (Python) import sympy from sympy import isprime {print(n) for n in range(10**4) if isprime(n**3+n-1) and isprime(n**3+n+1)} (Magma) [n: n in [1..5*10^3] |IsPrime(n^3+n-1) and IsPrime(n^3 +n+1)]; // Vincenzo Librandi, Dec 26 2015 (PARI) isok(n) = isprime(n^3+n+1) && isprime(n^3+n-1); \\ Michel Marcus, Dec 27 2015 CROSSREFS Intersection of A049407 and A236475. Sequence in context: A163785 A080793 A077225 * A039559 A045753 A022381 Adjacent sequences: A236523 A236524 A236525 * A236527 A236528 A236529 KEYWORD nonn AUTHOR Derek Orr, Jan 27 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.

Last modified December 6 11:24 EST 2023. Contains 367601 sequences. (Running on oeis4.)