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.
%I A329979 #27 Aug 26 2025 14:23:14 %S A329979 7,11,19,23,31,37,43,47,53,59,67,71,79,83,101,103,107,127,131,137,139, %T A329979 149,163,167,179,181,191,199,211,223,229,233,239,251,263,271,283,293, %U A329979 307,311,331,347,349,359,367,373,379,383,397,419,421,431,439,443,463,467,479,491,499 %N 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. %C A329979 Numbers of this form are an attempt to generalize Mersenne numbers (see link). %H A329979 Robert Israel, <a href="/A329979/b329979.txt">Table of n, a(n) for n = 1..10000</a> %H A329979 Craig J. Beisel, <a href="https://math.stackexchange.com/questions/3451929/can-it-be-shown-that-numbers-of-a-certain-form-produce-primes-more-often-than-ex">Can it be shown that numbers of a certain form produce primes more often than expected?</a>, Math StackExchange, November 2019. %p A329979 N:= 1000: # for terms <= N %p A329979 P:= select(isprime, [seq(i,i=3..(N+3)/2,2)]): %p A329979 S:= {}: %p A329979 for ip from 1 to nops(P) do %p A329979 p:= P[ip]; %p A329979 for i from 1 while p^i*3 - (p+3) <= N do %p A329979 for iq from 1 to ip-1 do %p A329979 q:= P[iq]; %p A329979 if p^i*q - (p+q) > N then break fi; %p A329979 for j from 1 do %p A329979 x:= p^i * q^j - (p+q); %p A329979 if x > N then break fi; %p A329979 if isprime(x) then S:= S union {x} fi; %p A329979 od od od od: %p A329979 sort(convert(S,list)); # _Robert Israel_, Aug 25 2025 %o A329979 (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) %K A329979 nonn,changed %O A329979 1,1 %A A329979 _Craig J. Beisel_, Nov 26 2019 %E A329979 Definition clarified by _Robert Israel_, Aug 25 2025