login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes of the form (p*(q-1) + (p-1)*q)/2, where p and q are consecutive odd primes.
3

%I #14 Nov 28 2018 19:07:12

%S 11,29,131,641,1721,2441,3539,10301,22349,36671,70481,79241,170957,

%T 175979,186191,198461,212981,304127,313031,324329,434939,655289,

%U 777041,852827,1031231,1126781,1339781,1511669,1571237,1741079,1875521,2003591

%N Primes of the form (p*(q-1) + (p-1)*q)/2, where p and q are consecutive odd primes.

%C Or, primes of the form prime(n)*prime(n+1)- (prime(n)+prime(n+1))/2.

%C Subsequence of A099909.

%e p=A000040(5)=11, q=A000040(5+1)=13: (11*(13-1)+(11-1)*13)/2 = (132+130)/2 = 131 = A000040(32), therefore 131 is a term.

%t f[n_] := Block[{p = Prime[n], q = Prime[n + 1]}, r = (p*(q - 1) + (p - 1)*q)/2; If[ PrimeQ[r], r, 0]]; l = {}; Do[a = f[n]; If[a != 0, AppendTo[l, a]], {n, 300}]; l (* _Robert G. Wilson v_, Nov 02 2004 *)

%t Select[((#[[1]](#[[2]]-1))+((#[[1]]-1)#[[2]]))/2&/@Partition[ Prime[ Range[ 2,300]],2,1],PrimeQ] (* _Harvey P. Dale_, Nov 28 2018 *)

%Y Cf. A098142.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Oct 29 2004

%E More terms from _Robert G. Wilson v_, Nov 02 2004

%E Edited by _N. J. A. Sloane_ at the suggestion of _Andrew S. Plewe_, May 21 2007