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.

A084745 Smallest prime of the form n^k - k, or 0 if no such prime exists.

This page as a plain text file.
%I A084745 #28 Jan 25 2024 12:18:42
%S A084745 2,2,3,23,5,47,7,79,997,5559917313492231463,11,167,13,223,4093,
%T A084745 24137563,17,359,19,439,
%U A084745 10947877107572929152919737180202022857988400441953615831
%N A084745 Smallest prime of the form n^k - k, or 0 if no such prime exists.
%C A084745 a(11) > 379749833583227. Conjecture: No entry is zero.
%C A084745 a(23) is 150 digits long and too long to include. - Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003
%C A084745 If n-1 is a prime then a(n)=n-1. - _Farideh Firoozbakht_, Aug 09 2014
%H A084745 Michel Marcus, <a href="/A084745/b084745.txt">Table of n, a(n) for n = 2..35</a>
%F A084745 a(n) = n^A084746(n) - A084746(n). - _Michel Marcus_, Aug 09 2014
%e A084745 a(7) = 47 = 7^2 - 2.
%p A084745 a := proc(n) local k; k := 1; while not isprime(n^k-k) do k := k+1 od; n^k-k end: seq(a(n),n=2..35);
%t A084745 sp[n_]:=Module[{k=1},While[!PrimeQ[n^k-k],k++];n^k-k]; Array[sp,21,2] (* _Harvey P. Dale_, Jul 22 2021 *)
%o A084745 (PARI) a(n)=my(k=1);while(!ispseudoprime(n^k-k),k++);return(n^k-k)
%o A084745 vector(20, n, a(n+1)) \\ _Derek Orr_, Aug 08 2014
%Y A084745 Cf. A084746.
%K A084745 nonn
%O A084745 2,1
%A A084745 _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003
%E A084745 More terms from Alec Mihailovs (Alec(AT)Mihailovs.com), Jun 16 2003