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.

A058013 Smallest prime p such that (n+1)^p - n^p is prime.

This page as a plain text file.
%I A058013 #80 Jul 01 2025 11:32:42
%S A058013 2,2,2,3,2,2,7,2,2,3,2,17,3,2,2,5,3,2,5,2,2,229,2,3,3,2,3,3,2,2,5,3,2,
%T A058013 3,2,2,3,3,2,7,2,3,37,2,3,5,58543,2,3,2,2,3,2,2,3,2,5,3,4663,54517,17,
%U A058013 3,2,5,2,3,3,2,2,47,61,19,23,2,2,19,7,2,7,3,2,331,2,179,5,2,5,3,2,2
%N A058013 Smallest prime p such that (n+1)^p - n^p is prime.
%C A058013 The terms a(47) and a(60) [were] unknown. The sequence continues at a(48): 2, 3, 2, 2, 3, 2, 2, 3, 2, 5, 3, 4663, a(60)=?, continued at a(61): 17, 3, 2, 5, 2, 3, 3, 2, 2, 47, 61, 19, 23, 2, 2, 19, 7, 2, 7, 3, 2, 331, 2, 179, 5, 2, 5, 3, 2, 2. - _Hugo Pfoertner_, Aug 27 2004
%C A058013 In September and November 2005, _Jean-Louis Charton_ found a(60)=54517 and a(47)=58543, respectively. Earlier, _Mike Oakes_ found a(106)=7639 and a(124)=5839. All these large values of a(n) yield probable primes. - _T. D. Noe_, Dec 05 2005, Sep 18 2008
%C A058013 a(106) = 6529 and a(124) = 5167 are true.
%C A058013 a(137) is probably 196873 from prime of this form discovered by _Jean-Louis Charton_ in December 2009 and reported to _Henri Lifchitz_'s PRP Top. - _Robert Price_, Feb 17 2012
%C A058013 a(138) through a(150) is 2,>32401,2,2,3,8839,5,7,2,3,5,271,13. - _Robert Price_, Feb 17 2012
%C A058013 a(276)=88301, a(139)>240000 and a(256)>100000. - _Jean-Louis Charton_, Jun 27 2012
%C A058013 Three more terms found, a(325)=81943, a(392)=64747, a(412)=56963 and also a(139)>260000, a(295)>100000, a(370)>100000, a(373)>100000. 29 unknown terms < 1000 remain. - _Jean-Louis Charton_, Aug 15 2012
%C A058013 Three more terms a(577)=55117, a(588)=60089 and a(756)=96487. - _Jean-Louis Charton_, Dec 13 2012
%C A058013 Three more (PRP) terms a(845)=83761, a(897)=48311, a(918)=54919. - _Jean-Louis Charton_, Dec 31 2013.
%C A058013 Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - _Hugo Pfoertner_, Nov 14 2019
%H A058013 Robert Price and Robert G. Wilson v, <a href="/A058013/b058013.txt">Table of n, a(n) for n = 1..138</a>
%H A058013 Jean-Louis Charton and Robert G. Wilson v, <a href="/A058013/a058013_4.txt">a(n) for n=1..1000 status</a>
%H A058013 Richard Fischer, <a href="http://www.fermatquotient.com/PrimSerien/PrimPot.txt">Generalized primes of the form (B+1)^N - B^N.</a>
%F A058013 a((p-1)/2) = 2 for odd primes p. - _Alexander Adamchuk_, Dec 01 2006
%t A058013 lmt = 10000; f[n_] := Block[{p = 2}, While[p < lmt && !PrimeQ[(n+1)^p - n^p], p = NextPrime@ p]; If[p > lmt, 0, p]]; Do[ Print[{n, f[n] // Timing}], {n, 1000}] (* _Robert G. Wilson v_, Dec 01 2014 *)
%t A058013 spp[n_]:=Module[{p=2},While[!PrimeQ[(n+1)^p-n^p],p=NextPrime[p]];p]; Array[spp,90] (* _Harvey P. Dale_, Jul 01 2025 *)
%o A058013 (PARI) a(n)=forprime(p=2,default(primelimit),if(ispseudoprime((n+1)^p-n^p),return(p))) \\ _Charles R Greathouse IV_, Feb 20 2012
%Y A058013 Cf. A065913, A103794, A115596, A247244.
%Y A058013 Cf. A000043, A057468, A059801, A059802, A062572-A062666, A215538.
%K A058013 nonn,nice
%O A058013 1,1
%A A058013 _Robert G. Wilson v_, Nov 13 2000
%E A058013 More terms from _T. D. Noe_, Dec 05 2005
%E A058013 Typo in first Mathematica program corrected by _Ray Chandler_, Feb 22 2017