OFFSET
1,2
COMMENTS
If n is odd, a(n) = 1.
a(n) <= n for all n.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
(1^1+6^6)/(1+6) = 46657/7 is not an integer. (2^2+6^6)/(2+6) = 46660/8 = 11665/2 is not an integer. (3^3+6^6)/(3+6) = 46683/9 = 5187 is an integer. Thus a(6) = 3.
MATHEMATICA
lnk[n_]:=Module[{k=1, n2=n^n}, While[!IntegerQ[(k^k+n2)/(k+n)], k++]; k]; Array[lnk, 90] (* or, using the lnk function defined above *) Riffle[ Table[lnk[n], {n, 2, 100, 2}], 1, {1, -1, 2}] (* Harvey P. Dale, Dec 25 2018 *)
PROG
(PARI) a(n)=for(k=1, 2500, s=(k^k+n^n)/(k+n); if(floor(s)==s, return(k)))
n=1; while(n<100, print(a(n)); n+=1)
(Haskell)
a242885 n = head [k | let nn = n ^ n,
k <- [1..], mod (k ^ k + nn) (k + n) == 0]
-- Reinhard Zumkeller, May 25 2014
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Derek Orr, May 25 2014
STATUS
approved