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!)
A205546 Least positive integer k such that n divides k^k-j^j for some j in [1,k-1]. 4

%I #14 Aug 23 2023 16:28:26

%S 2,3,2,4,4,4,4,6,4,6,5,4,3,4,4,6,4,4,5,6,4,5,3,8,6,3,6,4,6,8,6,6,6,8,

%T 6,4,7,9,8,6,9,4,6,5,8,8,10,8,8,6,4,9,9,9,8,8,8,6,9,8,10,12,4,6,8,9,9,

%U 8,8,8,5,10,10,9,12,9,8,9,9,6,9,9,18,4,4,16,7,8,8,12,8,8,12,10

%N Least positive integer k such that n divides k^k-j^j for some j in [1,k-1].

%C For a guide to related sequences, see A204892.

%H Robert Israel, <a href="/A205546/b205546.txt">Table of n, a(n) for n = 1..10000</a>

%e 1 divides 2^2-1^1 -> k=2, j=1

%e 2 divides 3^3-1^1 -> k=3, j=1

%e 3 divides 2^2-1^1 -> k=2, j=1

%e 4 divides 4^4-2^2 -> k=4, j=2

%p f:= proc(n) local S,k,v;

%p S:= {}:

%p for k from 1 do

%p v:= k &^ k mod n;

%p if member(v,S) then return k fi;

%p S:= S union {v}

%p od

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Aug 23 2023

%t s = Table[n^n, {n, 1, 120}];

%t lk = Table[NestWhile[# + 1 &, 1,

%t Min[Table[Mod[s[[#]] - s[[j]], z], {j, 1, # - 1}]] =!= 0 &], {z, 1, Length[s]}]

%t Table[NestWhile[# + 1 &, 1,

%t Mod[s[[lk[[j]]]] - s[[#]], j] =!= 0 &],

%t {j, 1, Length[lk]}]

%t (* _Peter J. C. Moses_, Jan 27 2012 *)

%Y Cf. A204892, A000312.

%K nonn

%O 1,1

%A _Clark Kimberling_, Jan 31 2012

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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)