login
Primes of the form prime(n+1)*prime(n+3) - prime(n)*prime(n+2) - 1, ordered by n.
1

%I #24 Oct 05 2024 17:10:35

%S 59,359,197,719,449,971,1019,937,419,863,809,2203,1979,1693,743,2693,

%T 3169,1823,3119,1637,2239,4547,4241,4967,4877,4259,2609,5651,7759,

%U 7823,4219,8971,6863,6983,7451,3989,12161,8147,11423,10369,9059,3299,6863

%N Primes of the form prime(n+1)*prime(n+3) - prime(n)*prime(n+2) - 1, ordered by n.

%H Charles R Greathouse IV, <a href="/A118624/b118624.txt">Table of n, a(n) for n = 1..10000</a>

%p 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);

%t 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 *)

%t Select[#[[2]]#[[4]]-#[[1]]#[[3]]-1&/@Partition[Prime[Range[300]],4,1],PrimeQ] (* _Harvey P. Dale_, Oct 05 2024 *)

%o (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

%Y Cf. A117854.

%K nonn,easy

%O 1,1

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, May 09 2006

%E Definition clarified by _Charles R Greathouse IV_, Feb 17 2011