

A317587


a(n) is the smallest number m > n such that Sum_{k=1..n1} k^(m1) == n1 (mod m).


0



3, 5, 5, 6, 7, 11, 11, 11, 11, 13, 13, 16, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 36, 37, 37, 40, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,1


COMMENTS

a(n) <= A151800(n), where a(n) < A151800(n) for n = 5, 13, 34, 37, ... with composite terms a(n) = 6, 16, 36, 40, ...
The smallest odd composite term is a(201) = 207. Are there any more?  Michel Marcus, Jul 02 2018
Conjecture: If p is a prime, then odd a(p) is the next prime after p.  Thomas Ordowski, Aug 06 2018


LINKS



MATHEMATICA

Array[Block[{m = # + 1}, While[Mod[Sum[k^(m  1), {k, #  1}], m] != #  1, m++]; m] &, 69, 2] (* Michael De Vlieger, Aug 02 2018 *)


PROG

(PARI) a(n) = for(m=n+1, oo, if (sum(k=1, n1, Mod(k, m)^(m1)) == Mod(n1, m), return (m)); ); \\ Michel Marcus, Aug 01 2018


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



