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.

A380905 Smallest number k such that k^(2*3^n) - 6 is prime.

Original entry on oeis.org

3, 5, 23, 7, 433, 2447, 9377, 82597, 134687
Offset: 0

Views

Author

Jakub Buczak, Feb 07 2025

Keywords

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

Examples

			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.
		

Crossrefs

Cf. Subsequence of A382246.
Cf. A028879 (a(0)), A239414 (a(1)) for the first term.

Programs

  • PARI
    a(n) = my(p=3,q=2*3^n); while (!ispseudoprime(p^q-6), p+=2); p; \\ Michel Marcus, Feb 08 2025
  • 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))
    

Extensions

a(7) from Michael S. Branicky, Feb 24 2025
a(8) from Georg Grasegger, Apr 17 2025