OFFSET
1,1
COMMENTS
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..10000
EXAMPLE
a(41) = 853; 853*3+1 = 2560; then dividing 9 times by 2 = 5, a prime.
MATHEMATICA
f[n_] := n/2^IntegerExponent[n, 2]; q[n_] := PrimeQ[n] && PrimeQ[f[3*n + 1]]; Select[4 * Range[300] + 1, q] (* Amiram Eldar, Jan 03 2022 *)
PROG
(Python)
from sympy import isprime
for p in range(1, 10000, 4):
if isprime(p):
p2 = (3 * p + 1)
while p2 % 2 == 0: p2 //= 2
if isprime(p2): print(p, end=", ")
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl-Heinz Hofmann, Dec 28 2021
STATUS
approved