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.

This page as a plain text file.
%I A382666 #40 May 04 2025 23:44:00
%S A382666 2,2,6,512,3918,48966
%N A382666 Smallest k such that 7^(7^n) - k is prime.
%C A382666 This is to 7 as A058220 is to 2, A140331 is to 3 and A364454 is to 6.
%C A382666 a(6) > 10000. - _Michael S. Branicky_, Apr 15 2025
%e A382666 a(2) = 6 because 7^(7^2) - 6 = 256923577521058878088611477224235621321601 is prime.
%t A382666 lst={};Do[Do[p=7^(7^n)-k;If[PrimeQ[p],AppendTo[lst,k];Break[]],{k,2,11!}],{n,7}];lst
%t A382666 Table[k=1;Monitor[Parallelize[While[True,If[PrimeQ[7^(7^n)-k],Break[]];k++];k],k],{n,0,7}]
%t A382666 y[n_] := Module[{x = 7^(7^n)}, x - NextPrime[x, -1]]; Array[y, 7]
%o A382666 (PARI) a(n) = my(x = 7^(7^n)); x - precprime(x-1);
%o A382666 (Python)
%o A382666 from sympy import prevprime
%o A382666 def a(n):
%o A382666     base = 7**(7**n)
%o A382666     return base - prevprime(base)
%o A382666 # _Jakub Buczak_, May 04 2025
%Y A382666 Cf. A058220, A140331, A364452, A364453, A364454.
%K A382666 nonn,hard,more
%O A382666 0,1
%A A382666 _J.W.L. (Jan) Eerland_, Apr 08 2025
%E A382666 a(5) from _Michael S. Branicky_, Apr 14 2025