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.
%I A158295 #11 Feb 01 2014 15:56:13 %S A158295 2,11,31,41,239,521,2309,4099,4409,4441,4651,5009,5039,5261,6481,6871, %T A158295 7129,8609,9391,10259,12841,13759,14519,14879,14939,15569,16871,18451, %U A158295 20369,22441,24049,25841,28151,28279,29429,30181,30631,32089,32299,36781 %N A158295 Primes p such that p^3-p-+1 are twin primes. %C A158295 Primes p such that p^3+p-+1 are twin primes, so far only one: 3. 3^3+3=30-+1 = primes. %C A158295 Primes in the sequence A236524. Odd primes are congruent to either 1 mod 10 or 9 mod 10. - _Derek Orr_, Jan 27 2014 %H A158295 Harvey P. Dale, <a href="/A158295/b158295.txt">Table of n, a(n) for n = 1..1000</a> %e A158295 2^3-2=6-+1 = 5,7 primes, 11^3-11-+1 = 1319,1321 primes... %t A158295 lst={};Do[p=Prime[n];a=p^3-p;If[PrimeQ[a-1]&&PrimeQ[a+1],AppendTo[lst,p]],{n,8!}];lst %t A158295 Select[Prime[Range[3500]],And@@PrimeQ[#^3-#+{1,-1}]&] (* _Harvey P. Dale_, Jan 05 2013 *) %o A158295 (Python) %o A158295 import sympy %o A158295 from sympy import isprime %o A158295 {print(p) for p in range(10**5) if isprime(p) and isprime(p**3-p-1) and isprime(p**3-p+1)} # _Derek Orr_, Jan 27 2014 %o A158295 (PARI) %o A158295 s=[]; forprime(p=2, 40000, if(isprime(p^3-p-1) && isprime(p^3-p+1), s=concat(s, p))); s /* _Colin Barker_, Jan 28 2014 */ %Y A158295 Cf. A120364, A088483, A236524, A236477, A126421. %K A158295 nonn %O A158295 1,1 %A A158295 _Vladimir Joseph Stephan Orlovsky_, Mar 15 2009