The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A259111 a(n) = least number k > 1 such that 1^k + 2^k + ... + k^k == n (mod k). 1
 2, 4, 2, 8, 2, 3, 2, 16, 2, 4, 2, 3, 2, 4, 2, 32, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 7, 2, 3, 2, 64, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 7, 2, 4, 2, 3, 2, 4, 2, 128, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 11, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..8192 FORMULA a(2^n) = 2^(n+1) for n >= 0. EXAMPLE Consider n=2: Is k=2? 1^2 + 2^2 == 1 (mod 2). No. Is k=3? 1^3 + 2^3 + 3^3 == 0 (mod 3). No. Is k=4? 1^4 + 2^4 + 3^4 + 4^4 == 2 (mod 4). Yes. So a(2) = 4. (Example corrected by N. J. A. Sloane, Jul 02 2019) MAPLE a:= proc(n) local k; for k from 2 while       add(i&^k mod k, i=1..k) mod k <> n mod k do od; k     end: seq(a(n), n=1..100);  # Alois P. Heinz, Jun 18 2015 MATHEMATICA lnk[n_]:=Module[{k=2}, While[Mod[Total[Range[k]^k], k]!=Mod[n, k], k++]; k]; Array[ lnk, 100] (* Harvey P. Dale, Jul 02 2019 *) PROG (PARI) vector(100, n, k=2; while(sum(i=1, k, i^k)!=Mod(n, k), k++); k) CROSSREFS Cf. A014117, A226960-A226967. Sequence in context: A335573 A073017 A296092 * A209675 A307669 A171977 Adjacent sequences:  A259108 A259109 A259110 * A259112 A259113 A259114 KEYWORD nonn AUTHOR Derek Orr, Jun 18 2015 STATUS approved

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

Last modified April 11 15:49 EDT 2021. Contains 342886 sequences. (Running on oeis4.)