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.
%I A095303 #37 Nov 16 2019 16:31:43 %S A095303 4,2,9,3,3,3,7,7,3,21,9,7,19,5,7,39,15,61,15,19,21,3,19,17,21,5,21,7, %T A095303 85,17,7,21,511,27,27,59,3,19,91,45,3,29,321,65,9,379,69,125,49,5,9, %U A095303 45,289,341,61,89,171,171,139,21,139,75,25,49,15,51,57,175,31,137,147,25,441 %N A095303 Smallest number k such that k^n - 2 is prime. %C A095303 The Bunyakovsky conjecture implies a(n) exists for all n. - _Robert Israel_, Jul 15 2018 %C A095303 Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - _Hugo Pfoertner_, Nov 16 2019 %H A095303 Robert Israel, <a href="/A095303/b095303.txt">Table of n, a(n) for n = 1..600</a> %H A095303 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bunyakovsky_conjecture">Bunyakovsky conjecture</a> %e A095303 a(1) = 4 because 4^1 - 2 = 2 is prime, a(3) = 9 because 3^3 - 2 = 25, 5^3 - 2 = 123 and 7^3 - 2 = 341 = 11 * 31 are composite, whereas 9^3 - 2 = 727 is prime. %p A095303 f:= proc(n) local k; %p A095303 for k from 3 by 2 do %p A095303 if isprime(k^n-2) then return k fi %p A095303 od %p A095303 end proc: %p A095303 f(1):= 4: f(2):= 2: %p A095303 map(f, [$1..100]); # _Robert Israel_, Jul 15 2018 %t A095303 a095303[n_] := For[k = 1, True, k++, If[PrimeQ[k^n - 2], Return[k]]]; Array[a095303, 100] (* _Jean-François Alcover_, Mar 01 2019 *) %o A095303 (PARI) for (n=1,73,for(k=1,oo,if(isprime(k^n-2),print1(k,", ");break))) \\ _Hugo Pfoertner_, Oct 28 2018 %Y A095303 Cf. A095304 (corresponding primes), A087576 (smallest k such that k^n+2 is prime), A095302 (corresponding primes). %Y A095303 Cf. A014224. %K A095303 nonn %O A095303 1,1 %A A095303 _Hugo Pfoertner_, Jun 01 2004 %E A095303 a(2) and a(46) corrected by _T. D. Noe_, Apr 03 2012