Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 May 16 2017 14:51:32
%S 2,4,8,10,14,27,27,43,33,66,64,85,75,90,163,111,127,178,170,145,172,
%T 215,197,238,239,324,298,364,345,328,516,442,544,421,482,613,495,605,
%U 544,647,553,646,645,520,743,594,738,645,852,1013,788,1205,728,900,801,1047
%N a(n) is the least number such that the set {p_1,p_2,...,p_a(n)} contains all residues modulo p_n (where p_m is m-th prime).
%H Zak Seidov, <a href="/A178215/b178215.txt">Table of n, a(n) for n = 1..1000</a>
%H Zak Seidov, <a href="/A178215/a178215.png">Graph of 1000 terms</a>
%e If n=3, then p_n=5 and we see that {2,3,5,7,11,13,17,19} is the minimal set of the first primes, which contains all residues modulo 5 (we have consecutive residues {2,3,0,2,1,3,2,4}. Therefore a(3)=8.
%t Table[k = 1; While[Union@ Mod[Prime@ Range@ k, #] != Range[0, # - 1], k++] &@ Prime@ n; k, {n, 56}] (* _Michael De Vlieger_, May 16 2017 *)
%Y Cf. A000040.
%K nonn
%O 1,1
%A _Vladimir Shevelev_, May 22 2010
%E a(10) corrected and a(11)-a(56) from _Donovan Johnson_, Jun 23 2010