%I #33 Mar 17 2017 09:59:01
%S 0,1,1,1,2,1,2,2,2,3,4,2,3,3,3,4,5,4,5,4,4,5,6,5,6,7,7,7,8,6,7,7,7,8,
%T 9,8,9,9,9,10,11,9,10,9,9,10,11,10,11,12,12,12,13,12,13,13,13,14,15,
%U 13,14,14,14,15,16,15,16,15,15,16,17,16,17,17,17,17,18,17
%N a(n) is the number of different values n mod k for 1 <= k <= floor(n/2).
%C a(n) is the number of distinct terms in the first half of the n-th row of the A048158 triangle. - _Michel Marcus_, Mar 04 2017
%C a(n)/n appears to converge to a constant, approximately 0.2296. Can this be proved, and does the constant have a closed form? - _Robert Israel_, Mar 13 2017
%C The constant that a(n)/n approaches is Sum {p prime} 1/(p^2+p)* Product {q prime < p} (q-1)/q. - _Michael R Peake_, Mar 16 2017
%H Robert Israel, <a href="/A283190/b283190.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael R Peake, <a href="https://math.stackexchange.com/questions/2185962/asymptotics-of-a283190">Explanation of limiting value of a(n)/n</a>
%e a(7) = 2 because 7=0 (mod 1), 7=1 (mod 2), 7=1 (mod 3), two different results.
%p N:= 100: # to get a(1)..a(N)
%p V:= Vector(N,1):
%p V[1]:= 0:
%p for m from 2 to N-1 do
%p k:= m/min(numtheory:-factorset(m));
%p ns:= [seq(n,n=m+1..min(N,m+k-1))];
%p V[ns]:= map(`+`,V[ns],1);
%p od:
%p convert(V,list); # _Robert Israel_, Mar 13 2017
%t Table[Length@ Union@ Map[Mod[n, #] &, Range@ Floor[n/2]], {n, 78}] (* _Michael De Vlieger_, Mar 03 2017 *)
%o (PARI) a(n) = #vecsort(vector(n\2, k, n % k),,8); \\ _Michel Marcus_, Mar 02 2017
%Y Cf. A048158.
%K nonn
%O 1,5
%A _Thomas Kerscher_, Mar 02 2017