login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242885 Least number k such that (k^k+n^n)/(k+n) is an integer. 2

%I #10 Dec 25 2018 16:56:07

%S 1,2,1,4,1,3,1,2,1,5,1,4,1,14,1,16,1,3,1,5,1,10,1,3,1,6,1,4,1,4,1,18,

%T 1,17,1,9,1,26,1,10,1,6,1,20,1,7,1,6,1,8,1,12,1,10,1,8,1,3,1,3,1,6,1,

%U 29,1,6,1,6,1,5,1,6,1,17,1,19,1,12,1,20,1,5,1,12,1,42,1

%N Least number k such that (k^k+n^n)/(k+n) is an integer.

%C If n is odd, a(n) = 1.

%C a(n) <= n for all n.

%C a(A242901(n)) = n and a(m) <> n for m < A242901(n). - _Reinhard Zumkeller_, May 25 2014

%H Reinhard Zumkeller, <a href="/A242885/b242885.txt">Table of n, a(n) for n = 1..10000</a>

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

%t 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 *)

%o (PARI) a(n)=for(k=1,2500,s=(k^k+n^n)/(k+n);if(floor(s)==s,return(k)))

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

%o (Haskell)

%o a242885 n = head [k | let nn = n ^ n,

%o k <- [1..], mod (k ^ k + nn) (k + n) == 0]

%o -- _Reinhard Zumkeller_, May 25 2014

%K nonn,look

%O 1,2

%A _Derek Orr_, May 25 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 12:37 EDT 2024. Contains 371937 sequences. (Running on oeis4.)