OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MAPLE
P:=proc(n)local i, j; for i from 1 by 1 to n do j:=abs(ithprime(i)*ithprime(i+2)-ithprime(i+1)*ithprime(i+3))-1; if isprime(j) then print(j); fi; od; end: P(1000);
MATHEMATICA
s=Table[Prime[n+1]*Prime[n+3] - Prime[n]*Prime[n+2] - 1, {n, 147}]; Select[s, PrimeQ] (* James C. McMahon, Sep 16 2024 *)
Select[#[[2]]#[[4]]-#[[1]]#[[3]]-1&/@Partition[Prime[Range[300]], 4, 1], PrimeQ] (* Harvey P. Dale, Oct 05 2024 *)
PROG
(PARI) my(v=List(), p=2, q=3, r=5); forprime(s=7, 1e6, my(t=q*s-p*r-1); if(ispseudoprime(t), listput(v, t)); p=q; q=r; r=s); v=Vec(v) \\ Charles R Greathouse IV, Feb 17 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, May 09 2006
EXTENSIONS
Definition clarified by Charles R Greathouse IV, Feb 17 2011
STATUS
approved