login
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).
5
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,1
COMMENTS
a(n) <= floor(sqrt(n)) follows from the definition of A188550.
LINKS
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 *)
CROSSREFS
Sequence in context: A262954 A262813 A360964 * A161966 A187188 A358618
KEYWORD
nonn,look
AUTHOR
Vladimir Shevelev, Apr 10 2011
STATUS
approved