Annual appeal: Please make a donation to keep the OEIS running!
Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
(MAGMA) lst:=[]; for n in [2..62] do k:=n+2; t:=0; while t eq 0 do if GCD(k, n) eq 1 and GCD(k-1, n-1) eq 1 then x:=-1; repeat x+:=1; p:=k-n^x; until p lt 2 or IsPrime(p); if p lt 2 then Append(~lst, k); t:=1; end if; end if; k+:=1; end while; end for; lst;