OFFSET
1,1
COMMENTS
No term k in the sequence can be divisible by 2 or 3. Except for the special case a(1)-a(3), where the result of k^n - 6 is either the prime number 2 or 3.
If n is a multiple of 4, the only valid terms of k are those ending in a 5.
Empirical analysis suggests that the terms are typically prime or semiprime.
LINKS
Jakub Buczak, Table of n, a(n) for n = 1..500
EXAMPLE
a(1) = 8, because 8^1 - 6 = 2, which is prime.
a(4) = 5, because 5^4 - 6 = 619, which is prime.
PROG
(Python)
from sympy import isprime
def a(n):
k = 1
while (n>1 and k not in [2, 3] and (k%2==0 or k%3==0)) or not isprime(k**n-6):
k += 1
return k
(PARI) a(n) = my(k=1); while (!isprime(k^n-6), k++); k; \\ Michel Marcus, Mar 19 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Jakub Buczak, Mar 19 2025
STATUS
approved
