login
Numbers k such that 3^(2*k+1) - 3^k - 1 is prime.
1

%I #31 May 23 2021 10:27:55

%S 1,2,5,6,7,10,17,25,31,88,95,137,141,416,610,781,800,2353,7291,9627,

%T 9749,15946,19215

%N Numbers k such that 3^(2*k+1) - 3^k - 1 is prime.

%C a(24) > 20000.

%p for k from 1 to 3000 do if isprime(3^(2*k + 1) - 3^k - 1) then print(k); end if; end do

%t Do[If[PrimeQ[3^(2k + 1) - 3^k - 1], Print[k]], {k, 1, 3000}]

%o (PARI) for(k=1, 3e3, if(isprime(3^(2*k+1)-3^k-1), print1(k", ")))

%o (SageMath)

%o for k in range(1, 3000):

%o if is_prime(3^(2 * k + 1) - 3^k - 1):

%o print(k)

%Y Cf. A344263.

%K nonn,more

%O 1,2

%A _Reza K Ghazi_, May 10 2021

%E a(19)-a(21) from _Michael S. Branicky_, May 11 2021

%E a(22)-a(23) from _Reza K Ghazi_, May 14 2021