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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For a guide to related sequences, see A204892.
LINKS
EXAMPLE
1 divides 2^2-1^1 -> k=2, j=1
2 divides 3^3-1^1 -> k=3, j=1
3 divides 2^2-1^1 -> k=2, j=1
4 divides 4^4-2^2 -> k=4, j=2
MAPLE
f:= proc(n) local S, k, v;
S:= {}:
for k from 1 do
v:= k &^ k mod n;
if member(v, S) then return k fi;
S:= S union {v}
od
end proc:
map(f, [$1..100]); # Robert Israel, Aug 23 2023
MATHEMATICA
s = Table[n^n, {n, 1, 120}];
lk = Table[NestWhile[# + 1 &, 1,
Min[Table[Mod[s[[#]] - s[[j]], z], {j, 1, # - 1}]] =!= 0 &], {z, 1, Length[s]}]
Table[NestWhile[# + 1 &, 1,
Mod[s[[lk[[j]]]] - s[[#]], j] =!= 0 &],
{j, 1, Length[lk]}]
(* Peter J. C. Moses, Jan 27 2012 *)
CROSSREFS
Sequence in context: A235805 A168231 A235728 * A322348 A081315 A035662
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 31 2012
STATUS
approved

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 July 4 15:17 EDT 2024. Contains 373994 sequences. (Running on oeis4.)