1,1

a(n) <= n+1 for all n.

Table of n, a(n) for n=1..83.

(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.

(PARI) a(n)=for(k=2, n+1, if(k!=n, s=(k^k-n)/(k-n); if(floor(s)==s, return(k))));

n=1; while(n<100, print(a(n)); n+=1)

Cf. A242787, A242788.

Sequence in context: A256170 A051686 A079294 * A076733 A079643 A329317

Adjacent sequences: A242786 A242787 A242788 * A242790 A242791 A242792

nonn

Derek Orr, May 22 2014

approved