OFFSET
1,1
EXAMPLE
2 is included as 2^2 - 1 = 3 and 5^2 - 1 = 24 share a prime factor 3.
MATHEMATICA
upto=10^4; Select[Prime[Range[PrimePi[upto]]], GCD[2^#-1, 5^#-1]>1&] (* Paolo Xausa, Nov 30 2021 *)
PROG
(PARI) isA349748(n) = (isprime(n)&&(gcd(2^n-1, 5^n-1)>1));
(Python)
from math import gcd
from sympy import isprime
def ok(n): return isprime(n) and gcd(2**n-1, 5**n-1) > 1
print([k for k in range(9500) if ok(k)]) # Michael S. Branicky, Nov 30 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 30 2021
STATUS
approved