A188794 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).
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, 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, 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
Offset: 4
Links
- Alois P. Heinz, Table of n, a(n) for n = 4..20004
Programs
-
Maple
with(numtheory): a:= proc(n) local h, i, k, m; m,i:= 0,0; for k from 2 to floor(sqrt(n)) do h:= nops(select(x-> irem(x, k)=0, [seq (n-d, d=divisors(n-k) minus{1})])); if h>m then m,i:= h,k fi od; i end: seq(a(n), n=4..120); # Alois P. Heinz, Apr 10 2011
-
Mathematica
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]; a /@ Range[4, 120] (* Jean-François Alcover, Oct 28 2020, after Alois P. Heinz *)
Comments