cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A091305 Primes of the form p*q - p - q, where p and q are primes.

This page as a plain text file.
%I A091305 #32 Jun 05 2025 15:41:17
%S A091305 3,5,7,11,17,19,23,29,31,41,43,47,59,71,79,83,101,103,107,131,137,139,
%T A091305 149,163,167,179,191,197,199,211,223,227,239,251,263,269,271,281,311,
%U A091305 331,347,359,379,383,419,431,443,461,463,467,479,491,499,503,521,523
%N A091305 Primes of the form p*q - p - q, where p and q are primes.
%C A091305 Some primes have more than one representation (besides of symmetry in p,q!), e.g. 11 with (p,q)=(2,13) and (3,7).
%C A091305 If (r,r+2) is a twin prime pair then r is in this sequence (with q=2, p=r+2). - _Emmanuel Vantieghem_, Jun 02 2025
%H A091305 T. D. Noe, <a href="/A091305/b091305.txt">Table of n, a(n) for n=1..1000</a>
%e A091305 31 is a member with p=3, q=17.
%p A091305 N:= 1000: # for terms <= N
%p A091305 P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
%p A091305 S:= {}:
%p A091305 for i from 1 to nops(P) do
%p A091305   for j from 1 to i do
%p A091305     x:= P[i]*P[j]-P[i]-P[j];
%p A091305     if x > N then break fi;
%p A091305     if isprime(x) then S:= S union {x} fi
%p A091305 od od:
%p A091305 sort(convert(S,list)); # _Robert Israel_, Jun 05 2025
%t A091305 mp[{p_,q_}]:=p*q-p-q; Take[Union[Select[mp/@Subsets[Prime[Range[100]],{2}], PrimeQ]],60] (* _Harvey P. Dale_, Nov 27 2011 *)
%o A091305 (PARI) isA091305(p)=fordiv(p++,d,if(isprime(d+1)&isprime(p/d+1), return(isprime(p-1)))) \\ _Charles R Greathouse IV_, Feb 15 2011
%Y A091305 Cf. A066938 (p*q + p + q), A091301 (p*q + p - q).
%Y A091305 Cf. A001359 (subsequence).
%K A091305 easy,nice,nonn
%O A091305 1,1
%A A091305 _Zak Seidov_, Feb 21 2004