%I #4 Jul 30 2015 22:49:19
%S 1,0,119,649,13,493,989,667,4399,67,3763,4819,4717,9943,179,20437,
%T 15677,193,26797,27977,21251,37267,68923,45671,131179,72967,105779,
%U 76409,117961,131867,147109,243169,152447,200653,158399,254563,306079,215639
%N a(n) = smallest M such that M is not divisible by prime(1), ..., prime(n), but is divisible by Sum_{i=1..n} (M mod prime(i)); or 0 if no such M exists.
%e a(1) = first value M which is not divisible by 2, but is divisible by (M mod 2). a(1) = 1.
%e a(2) = 0.
%e a(3) = first value M which is not divisible by 2, 3 or 5, but is divisible by (M mod 2) + (M mod 3) + (M mod 5). a(3) = 119.
%e a(4) = first value M which is not divisible by 2, 3, 5 or 7, but is divisible by (M mod 2) + (M mod 3) + (M mod 5) + (M mod 7). a(4) = 649.
%t f[n_] := If[n == 2, 0, Block[{k = 0, p = Prime[ Range[n]]}, While[j = Mod[k, p]; Sort[j][[1]] == 0 || Mod[k, Plus @@ Mod[k, p]] != 0, k++ ]; k]]; Table[ f[n], {n, 10}] (* _Robert G. Wilson v_, May 31 2005 *)
%K nonn
%O 1,3
%A Chuck Seggelin (seqfan(AT)plastereddragon.com), May 30 2005
%E a(23)-a(38) from _Robert G. Wilson v_, May 31 2005