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.

A329979 Prime numbers which can be represented as p^i * q^j - (p + q) where p and q are distinct odd primes and i,j > 0.

Original entry on oeis.org

7, 11, 19, 23, 31, 37, 43, 47, 53, 59, 67, 71, 79, 83, 101, 103, 107, 127, 131, 137, 139, 149, 163, 167, 179, 181, 191, 199, 211, 223, 229, 233, 239, 251, 263, 271, 283, 293, 307, 311, 331, 347, 349, 359, 367, 373, 379, 383, 397, 419, 421, 431, 439, 443, 463, 467, 479, 491, 499
Offset: 1

Views

Author

Craig J. Beisel, Nov 26 2019

Keywords

Comments

Numbers of this form are an attempt to generalize Mersenne numbers (see link).

Programs

  • Maple
    N:= 1000: # for terms <= N
    P:= select(isprime, [seq(i,i=3..(N+3)/2,2)]):
    S:= {}:
    for ip from 1 to nops(P) do
      p:= P[ip];
      for i from 1 while p^i*3 - (p+3) <= N do
        for iq from 1 to ip-1 do
           q:= P[iq];
           if p^i*q - (p+q) > N then break fi;
           for j from 1 do
             x:= p^i * q^j - (p+q);
             if x > N then break fi;
             if isprime(x) then S:= S union {x} fi;
    od od od od:
    sort(convert(S,list));  # Robert Israel, Aug 25 2025
  • PARI
    z=[];forprime(a=3,1000, forprime(b=a+2,1000, for(i=1,10, for(j=1,10, y=a+b; x=a^i*b^j-y; if(x<500 && isprime(x) && setsearch(z,x)==0,z=setunion(z,[x])) )))); print(z)

Extensions

Definition clarified by Robert Israel, Aug 25 2025