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.

A382666 Smallest k such that 7^(7^n) - k is prime.

Original entry on oeis.org

2, 2, 6, 512, 3918, 48966
Offset: 0

Views

Author

J.W.L. (Jan) Eerland, Apr 08 2025

Keywords

Comments

This is to 7 as A058220 is to 2, A140331 is to 3 and A364454 is to 6.
a(6) > 10000. - Michael S. Branicky, Apr 15 2025

Examples

			a(2) = 6 because 7^(7^2) - 6 = 256923577521058878088611477224235621321601 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[Do[p=7^(7^n)-k;If[PrimeQ[p],AppendTo[lst,k];Break[]],{k,2,11!}],{n,7}];lst
    Table[k=1;Monitor[Parallelize[While[True,If[PrimeQ[7^(7^n)-k],Break[]];k++];k],k],{n,0,7}]
    y[n_] := Module[{x = 7^(7^n)}, x - NextPrime[x, -1]]; Array[y, 7]
  • PARI
    a(n) = my(x = 7^(7^n)); x - precprime(x-1);
    
  • Python
    from sympy import prevprime
    def a(n):
        base = 7**(7**n)
        return base - prevprime(base)
    # Jakub Buczak, May 04 2025

Extensions

a(5) from Michael S. Branicky, Apr 14 2025