cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236524 Numbers n such that n^3 - n +/- 1 are twin primes.

This page as a plain text file.
%I A236524 #10 Sep 08 2022 08:46:06
%S A236524 2,4,11,14,15,21,31,35,41,45,111,130,136,140,155,176,189,221,230,239,
%T A236524 274,316,406,414,441,465,466,504,521,561,570,580,584,591,686,689,696,
%U A236524 759,834,836,860,869,904,960,1026,1159,1379,1539,1614,1625,1660
%N A236524 Numbers n such that n^3 - n +/- 1 are twin primes.
%H A236524 Vincenzo Librandi, <a href="/A236524/b236524.txt">Table of n, a(n) for n = 1..2600</a>
%e A236524 561^3 - 561 + 1 (176557921) and 561^3 - 561 - 1 (176557919) are twin primes. Thus, 561 is a member of this sequence.
%t A236524 Select[Range[2000], PrimeQ[#^3 - # - 1] && PrimeQ[#^3 - # + 1] &] (* _Vincenzo Librandi_, Jan 30 2018 *)
%o A236524 (Python)
%o A236524 import sympy
%o A236524 from sympy import isprime
%o A236524 {print(n) for n in range(10**4) if isprime(n**3-n-1) and isprime(n**3-n+1)}
%o A236524 (Magma) [n: n in [1..2000] | IsPrime(n^3-n-1) and IsPrime(n^3-n+1)]; // _Vincenzo Librandi_, Jan 30 2018
%Y A236524 Intersection of A126421 and A236477.
%K A236524 nonn
%O A236524 1,1
%A A236524 _Derek Orr_, Jan 27 2014