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 A242789 #9 Jun 04 2021 10:12:26 %S A242789 2,3,2,2,3,3,3,4,3,4,3,6,4,7,3,4,5,4,7,5,5,4,7,9,4,7,3,7,5,13,5,4,9, %T A242789 12,5,6,10,16,9,4,9,16,7,5,5,4,10,13,7,7,11,13,5,9,7,6,5,12,19,9,11, %U A242789 17,7,7,5,11,4,16,9,5,11,16,9,13,15,13,9,12,7,31,6,16,5 %N A242789 Least number k > 1 such that (k^k-n)/(k-n) is an integer. %C A242789 a(n) <= n+1 for all n. %H A242789 Seiichi Manyama, <a href="/A242789/b242789.txt">Table of n, a(n) for n = 1..10000</a> %e A242789 (2^2-8)/(2-8) = -4/-6 is not an integer. (3^3-8)/(3-8) = 19/-5 is not an integer. (4^4-8)/(4-8) = 248/4 = 62 is an integer. Thus a(8) = 4. %t A242789 a[n_] := Module[{k = 2}, While[k == n || ! Divisible[k^k - n, k - n], k++]; k]; Array[a, 100] (* _Amiram Eldar_, Jun 04 2021 *) %o A242789 (PARI) a(n)=for(k=2,n+1,if(k!=n,s=(k^k-n)/(k-n);if(floor(s)==s,return(k)))); %o A242789 n=1;while(n<100,print(a(n));n+=1) %Y A242789 Cf. A242787, A242788. %K A242789 nonn %O A242789 1,1 %A A242789 _Derek Orr_, May 22 2014