OFFSET
4,8
LINKS
Alois P. Heinz, Table of n, a(n) for n = 4..10000
MAPLE
with(numtheory):
a:= proc(n) option remember; local c, h, k, m;
m, c:= 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 c:=c+1 elif h>m then m, c:= h, 1 fi
od; c
end:
seq(a(n), n=4..120); # Alois P. Heinz, Apr 10 2011
MATHEMATICA
b[n_] := Max @ Table[Length @ Select[Table[n-d, {d, Divisors[n-k] // Rest} ], Mod[#, k] == 0&], {k, 2, Floor[Sqrt[n]]}];
a[n_] := a[n] = Count[Range[2, Floor[Sqrt[n]]], k_ /; Count[Rest @ Divisors[n-k], d_ /; Divisible[n-d, k]] == b[n]];
Table[a[n], {n, 4, 120}] (* Jean-François Alcover, Mar 27 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 10 2011
STATUS
approved