OFFSET
1,1
COMMENTS
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
13 is in this sequence because (13-1)*13^2-1 = 2027 and 13^2-(13-1) = 157 are both prime.
MATHEMATICA
Select[Range[1000], PrimeQ[#^3 - #^2 - 1] && PrimeQ[#^2 - # + 1] &] (* Giovanni Resta, Mar 10 2014 *)
Select[Range[1200], PrimeOmega[#^5-2#^4+2#^3-2#^2+#-1]==2&] (* Harvey P. Dale, Sep 24 2014 *)
PROG
(PARI) isok(n) = isprime(n^3-n^2-1) && isprime(n^2-n+1); \\ Michel Marcus, Mar 10 2014
(Magma) k:=1;
for n in [1..1000] do
if IsPrime(k*(n-1)*n^2-1) and IsPrime(k*n^2-n+1) then
n;
end if;
end for; \\ Juri-Stepan Gerasimov, Mar 18 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Lopatin following a suggestion from Juri-Stepan Gerasimov, Mar 10 2014,
EXTENSIONS
More terms from Giovanni Resta, Mar 10 2014
STATUS
approved