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 A239115 #29 Jan 23 2025 20:06:42 %S A239115 2,3,4,6,7,9,13,18,21,22,58,67,79,90,100,106,111,118,120,144,162,174, %T A239115 195,204,246,273,279,345,393,403,406,435,436,526,541,567,613,625,636, %U A239115 702,721,729,736,744,762,763,865,898,961,970,993,1059,1099,1117,1131 %N A239115 Numbers n such that (n-1)*n^2-1 and n^2-(n-1) are both prime. %C A239115 Numbers n such that (n^3-n^2-1)*(n^2-n+1) is semiprime. %C A239115 Intersection of A162293 and A055494. %C A239115 Primes in this sequence: 2, 3, 7, 13, 67, 79, 541, 613, 1117, ... %C A239115 Squares in this sequence: 4, 9, 100, 144, 961, ... %H A239115 Giovanni Resta, <a href="/A239115/b239115.txt">Table of n, a(n) for n = 1..10000</a> %e A239115 13 is in this sequence because (13-1)*13^2-1 = 2027 and 13^2-(13-1) = 157 are both prime. %t A239115 Select[Range[1000], PrimeQ[#^3 - #^2 - 1] && PrimeQ[#^2 - # + 1] &] (* _Giovanni Resta_, Mar 10 2014 *) %t A239115 Select[Range[1200],PrimeOmega[#^5-2#^4+2#^3-2#^2+#-1]==2&] (* _Harvey P. Dale_, Sep 24 2014 *) %o A239115 (PARI) isok(n) = isprime(n^3-n^2-1) && isprime(n^2-n+1); \\ _Michel Marcus_, Mar 10 2014 %o A239115 (Magma) k:=1; %o A239115 for n in [1..1000] do %o A239115 if IsPrime(k*(n-1)*n^2-1) and IsPrime(k*n^2-n+1) then %o A239115 n; %o A239115 end if; %o A239115 end for; // _Juri-Stepan Gerasimov_, Mar 18 2014 %Y A239115 Cf. A162291, A002383, A239135, A239326. %K A239115 nonn %O A239115 1,1 %A A239115 _Ilya Lopatin_ following a suggestion from _Juri-Stepan Gerasimov_, Mar 10 2014, %E A239115 More terms from _Giovanni Resta_, Mar 10 2014