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 A125973 #14 Feb 26 2019 03:40:50 %S A125973 2,2,2,2,2,3,2,2,14,4,7,2,38,6,7,3,4,10,2,9,74,6,10,7,4,61,20,4,5,9,6, %T A125973 16,6,8,2,9,4,10,2,48,44,163,9,2,95,3,27,70,6,26,57,9,6,8,207,2,27,15, %U A125973 45,7,69,199,55,16,2,5,12,43,137,39,9,57,5,20,4,115,2,103,45,15,20,109 %N A125973 Smallest k such that k^n + k^(n-1) - 1 is prime. %C A125973 The polynomial x^n + x^(n-1) - 1 is irreducible over the rationals (see Ljunggren link), so the Bunyakovsky conjecture implies that a(n) always exists. - _Robert Israel_, Nov 16 2016 %H A125973 Robert Israel, <a href="/A125973/b125973.txt">Table of n, a(n) for n = 1..800</a> %H A125973 W. Ljunggren, <a href="https://www.jstor.org/stable/24489120">On the irreducibility of certain trinomials and quadrinomials</a>, Math. Scand. 8 (1960) 65-70. %H A125973 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bunyakovsky_conjecture">Bunyakovsky conjecture</a>. %e A125973 Consider n = 6. k^6 + k^5 - 1 evaluates to 1, 95, 971 for k = 1, 2, 3. Only the last of these numbers is prime, hence a(6) = 3. %p A125973 f:= proc(n) local k; %p A125973 for k from 2 do if isprime(k^n+k^(n-1)-1) then return k fi od %p A125973 end proc: %p A125973 map(f, [$1..100]); # _Robert Israel_, Nov 16 2016 %t A125973 a[n_] := For[k = 2, True, k++, If[PrimeQ[k^n + k^(n-1) - 1], Return[k]]]; %t A125973 Array[a, 100] (* _Jean-François Alcover_, Feb 26 2019 *) %o A125973 (PARI) {m=82;for(n=1,m,k=1;while(!isprime(k^n+k^(n-1)-1),k++);print1(k,","))} \\ _Klaus Brockhaus_, Dec 17 2006 %Y A125973 Cf. A000040, A045546, A125881-A125885, A125965-A125972, A126017. %Y A125973 Cf. A091997 (n such that a(n)=2). %K A125973 nonn %O A125973 1,1 %A A125973 _Artur Jasinski_, Dec 14 2006 %E A125973 Edited and extended by _Klaus Brockhaus_, Dec 17 2006