%I #17 Oct 28 2020 10:28:32
%S 2,2,2,2,2,3,2,2,2,2,2,3,2,2,2,3,2,3,2,2,2,5,2,3,4,2,2,3,2,3,2,5,4,2,
%T 2,3,4,2,2,3,2,3,2,2,3,7,2,3,4,2,2,5,2,3,2,3,4,2,2,3,4,5,2,2,4,3,2,2,
%U 2,3,2,3,4,2,6,2,2,3,2,3,4,5,2,3,4,2,2,7,2,3,4,5,6,2,2,3,4,2,2,3,8,5,2,2,3,4,2,3,2,3,2
%N a(n) is the smallest integer k >= 2 such that the number of divisors d>1 of n-k with k|(n-d) equals A188550(n).
%C a(n) <= floor(sqrt(n)) follows from the definition of A188550.
%H Alois P. Heinz, <a href="/A188794/b188794.txt">Table of n, a(n) for n = 4..20004</a>
%p with(numtheory):
%p a:= proc(n) local h, i, k, m;
%p m,i:= 0,0;
%p for k from 2 to floor(sqrt(n)) do
%p h:= nops(select(x-> irem(x, k)=0,
%p [seq (n-d, d=divisors(n-k) minus{1})]));
%p if h>m then m,i:= h,k fi
%p od; i
%p end:
%p seq(a(n), n=4..120); # _Alois P. Heinz_, Apr 10 2011
%t a[n_] := Module[{h, i = 0, k, m = 0}, For[k = 2, k <= Floor[Sqrt[n]], k++, h = Length[Select[Table[n-d, {d, Rest[Divisors[n-k]]}], Mod[#, k] == 0&]]; If[h > m, {m, i} = {h, k}]]; i];
%t a /@ Range[4, 120] (* _Jean-François Alcover_, Oct 28 2020, after _Alois P. Heinz_ *)
%Y Cf. A188550, A188579.
%K nonn,look
%O 4,1
%A _Vladimir Shevelev_, Apr 10 2011