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.

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 59, 71, 79, 83, 101, 103, 107, 131, 137, 139, 149, 163, 167, 179, 191, 197, 199, 211, 223, 227, 239, 251, 263, 269, 271, 281, 311, 331, 347, 359, 379, 383, 419, 431, 443, 461, 463, 467, 479, 491, 499, 503, 521, 523
Offset: 1

Views

Author

Zak Seidov, Feb 21 2004

Keywords

Comments

Some primes have more than one representation (besides of symmetry in p,q!), e.g. 11 with (p,q)=(2,13) and (3,7).
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

Examples

			31 is a member with p=3, q=17.
		

Crossrefs

Cf. A066938 (p*q + p + q), A091301 (p*q + p - q).
Cf. A001359 (subsequence).

Programs

  • Maple
    N:= 1000: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
    S:= {}:
    for i from 1 to nops(P) do
      for j from 1 to i do
        x:= P[i]*P[j]-P[i]-P[j];
        if x > N then break fi;
        if isprime(x) then S:= S union {x} fi
    od od:
    sort(convert(S,list)); # Robert Israel, Jun 05 2025
  • Mathematica
    mp[{p_,q_}]:=p*q-p-q; Take[Union[Select[mp/@Subsets[Prime[Range[100]],{2}], PrimeQ]],60] (* Harvey P. Dale, Nov 27 2011 *)
  • 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