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 A111503 #30 Oct 01 2024 15:22:11 %S A111503 2,3,6,13,21,33,48,58,90,96,99,100,111,118,120,121,133,138,195,204, %T A111503 279,334,348,366,393,400,465,525,541,565,594,721,736,789,855,859,925, %U A111503 946,1044,1099,1239,1279,1323,1410,1459,1470,1513,1521,1524,1629,1630,1638 %N A111503 Numbers k such that k^3 - k^2 - 1 and k^3 - k^2 + 1 are twin primes. %C A111503 Intersection of A111501 and A162293. - _Ivan Neretin_, Aug 24 2016 %H A111503 Harvey P. Dale, <a href="/A111503/b111503.txt">Table of n, a(n) for n = 1..1000</a> %e A111503 2^3 - 2^2 - 1 = 3, 2^3 - 2^2 + 1 = 5, 3 and 5 are twin primes, so 2 is in the sequence. %t A111503 lst={}; Do[If[PrimeQ[n^3-n^2-1]&&PrimeQ[n^3-n^2+1], AppendTo[lst, n]], {n, 10^3}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 08 2008 *) %t A111503 tpQ[n_]:=Module[{c=n^3-n^2},And@@PrimeQ[{c+1,c-1}]]; Select[Range[ 1700],tpQ] (* _Harvey P. Dale_, Aug 27 2012 *) %o A111503 (Magma) [n: n in [0..100000] |IsPrime(n^3-n^2-1) and IsPrime(n^3-n^2+1)]; // _Vincenzo Librandi_, Nov 13 2010 %o A111503 (PARI) isok(n) = isprime(n^3 - n^2 - 1) && isprime(n^3 - n^2 + 1); \\ _Michel Marcus_, Aug 24 2016 %Y A111503 Cf. A111501, A162293. %K A111503 nonn %O A111503 1,1 %A A111503 _Pierre CAMI_, Nov 16 2005