login
a(n) is the least exponent k > 1 such that m^k is congruent to m modulo n for all natural numbers m, or a(n) = 1 if no such k exists.
0

%I #6 Mar 31 2012 10:29:27

%S 2,2,3,1,5,3,7,1,1,5,11,1,13,7,5,1,17,1,19,1,7,11,23,1,1,13,1,1,29,5,

%T 31,1,11,17,13,1,37,19,13,1,41,7,43,1,1,23,47,1,1,1,17,1,53,1,21,1,19,

%U 29,59,1,61,31,1,1,13,11,67,1,23,13,71,1,73,37,1,1,31,13,79,1,1,41,83,1

%N a(n) is the least exponent k > 1 such that m^k is congruent to m modulo n for all natural numbers m, or a(n) = 1 if no such k exists.

%C If n is squarefree, a(n) = 1+A002322(n) = 1+A011773(n). Otherwise a(n) = 1. a(n) = n iff n is prime.

%F For squarefree n = p1*p2*...*pj, a(n) = 1+lcm(p1-1, p2-1, ..., pj-1).

%e a(35) = 13 because 35 divides 1^13-1, 2^13-2, 3^13-3, etc.; but 35 does not divide 2^2-2, 2^3-3, 2^4-2, ..., 2^11-2 or 2^12-2.

%Y Cf. A002322, A011773.

%K nonn,easy

%O 1,1

%A _Franz Vrabec_, Aug 09 2004

%E Edited and extended by _David Wasserman_, Oct 30 2007