|
|
A239115
|
|
Numbers n such that (n-1)*n^2-1 and n^2-(n-1) are both prime.
|
|
3
|
|
|
2, 3, 4, 6, 7, 9, 13, 18, 21, 22, 58, 67, 79, 90, 100, 106, 111, 118, 120, 144, 162, 174, 195, 204, 246, 273, 279, 345, 393, 403, 406, 435, 436, 526, 541, 567, 613, 625, 636, 702, 721, 729, 736, 744, 762, 763, 865, 898, 961, 970, 993, 1059, 1099, 1117, 1131
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Numbers n such that (n^3-n^2-1)*(n^2-n+1) is semiprime.
Primes in this sequence: 2, 3, 7, 13, 67, 79, 541, 613, 1117, ...
Squares in this sequence: 4, 9, 100, 144, 961, ...
|
|
LINKS
|
|
|
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;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|