cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382246 Smallest number k such that k^n - 6 is prime.

This page as a plain text file.
%I A382246 #23 Mar 29 2025 18:50:05
%S A382246 8,3,2,5,5,5,19,85,7,5,19,275,23,43,53,455,65,23,23,175,7,65,47,295,7,
%T A382246 143,49,115,23,355,185,305,7,55,319,85,113,25,329,505,25,187,205,25,
%U A382246 295,437,17,2285,7,583,35,1375,5,7,35,895,235,277,197,695,203,145,43,35,437,215
%N A382246 Smallest number k such that k^n - 6 is prime.
%C A382246 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.
%C A382246 If n is a multiple of 4, the only valid terms of k are those ending in a 5.
%C A382246 Empirical analysis suggests that the terms are typically prime or semiprime.
%H A382246 Jakub Buczak, <a href="/A382246/b382246.txt">Table of n, a(n) for n = 1..500</a>
%e A382246 a(1) = 8, because 8^1 - 6 = 2, which is prime.
%e A382246 a(4) = 5, because 5^4 - 6 = 619, which is prime.
%o A382246 (Python)
%o A382246 from sympy import isprime
%o A382246 def a(n):
%o A382246     k = 1
%o A382246     while (n>1 and k not in [2,3] and (k%2==0 or k%3==0)) or not isprime(k**n-6):
%o A382246         k += 1
%o A382246     return k
%o A382246 (PARI) a(n) = my(k=1); while (!isprime(k^n-6), k++); k; \\ _Michel Marcus_, Mar 19 2025
%Y A382246 Cf. A380905
%Y A382246 Cf. A028879 (a(2)), A239414 (a(6)) for the first term.
%K A382246 nonn
%O A382246 1,1
%A A382246 _Jakub Buczak_, Mar 19 2025