A351141 Pairs of primes (p,q) = (A002496(m), A002496(m+1)) such that q-p is a power r of the product of its prime factors for some m.
37, 101, 577, 677, 15877, 16901, 57601, 62501, 33988901, 34035557, 113209601, 113507717, 121528577, 121572677, 345960001, 346332101, 635040001, 635544101, 7821633601, 7823402501, 17748634177, 17749167077, 24343488577, 24344112677, 97958984257, 97962740101
Offset: 1
Keywords
Examples
The pair (257, 401) = (16^2+1, 20^2+1) is not in the sequence because 401 - 257 = 144 = 2^4*3^2. The pair (577, 677) = (24^2+1, 26^2+1) is in the sequence because 577 - 677 = 100 = 2^2*5^2. The pair (33988901, 34035557) = (5830^2+1, 5834^2+1) is in the sequence because 33988901 - 34035557 = 46656 = 2^6*3^6.
Programs
-
Maple
with(numtheory): T:=array(1..26):nn:=350000:q:=5:j:=1: for n from 4 by 2 to nn do: p:=n^2+1: if type(p, prime)=true then x:=p-q:r:=q:q:=p: u:=factorset(x):n0:=nops(u):ii:=0:d:=product(u[i],i=1..n0): for k from 2 to 20 while(ii=0) do: if d^k=x then ii=1:T[j]:=r:T[j+1]:=q:j:=j+2: else fi: od: fi: od: print(T):
-
PARI
lista(nn) = my(lastp=2); forprime(p=nextprime(lastp+1), nn, if (issquare(p-1), if (ispowerful(p-lastp), my(f=factor(p-lastp)[,2]); if (vecmin(f) == vecmax(f), print1(lastp, ", ", p, ", "));); lastp = p;);); \\ Michel Marcus, Feb 03 2022
Comments