OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
Carlos Rivera, Puzzle 1064. GCD(2^p+1,3^p+1), The Prime Puzzles and Problems Connection.
EXAMPLE
Since GCD(2^83 + 1, 3^83 + 1) = 499, the prime 83 is in the sequence. It is only the second such prime, so a(2) = 83.
MATHEMATICA
Select[Prime@ Range@ 2000, GCD[2^# + 1, 3^# + 1] > 1 &] (* Michael De Vlieger, Nov 16 2015 *)
PROG
(Sage)
# code will list all such primes no larger than the N-th prime.
N=1000
for k in range(N):
if (gcd(2^Primes().unrank(k)+1, 3^Primes().unrank(k)+1) != 1):
print(Primes().unrank(k))
(PARI) list(lim)=forprime(p=2, lim, if(gcd(2^p+1, 3^p+1)>1, print1(p, ", "))) \\ Anders Hellström, Nov 14 2015
(Python)
from sympy import prime
from fractions import gcd
A260674_list = [p for p in (prime(n) for n in range(1, 10**3)) if gcd(2**p+1, 3**p+1) > 1] # Chai Wah Wu, Nov 23 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Jordan, Nov 14 2015
STATUS
approved