OFFSET
0,1
COMMENTS
Terms must have an ending digit of 3, 5 or 7. If k ends in 1 or 9, then k^(2*3^n)-6 ends in a 5, which is not prime.
a(7) is the first composite term. - Michael S. Branicky, Feb 24 2025
EXAMPLE
For n=0, k^(2*3^0) - 6 is prime for the first time at a(0) = k = 3.
For n=5, k^(2*3^5) - 6 is prime for the first time at a(5) = k = 2447.
PROG
(Python)
from sympy import isprime
from itertools import count
def a(n): return next(k for k in count(2) if k%10 in {3, 5, 7} and isprime(k**(2*3**n)-6))
(PARI) a(n) = my(p=3, q=2*3^n); while (!ispseudoprime(p^q-6), p+=2); p; \\ Michel Marcus, Feb 08 2025
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Jakub Buczak, Feb 07 2025
EXTENSIONS
a(7) from Michael S. Branicky, Feb 24 2025
a(8) from Georg Grasegger, Apr 17 2025
STATUS
approved
