OFFSET
6,1
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 6..3005
EXAMPLE
Let n = 33. We begin with k = 2. Divisors>1 of 33 + 2 = 35 are d = 5,7,35. For all d, 33 + d is divisible by k = 2. But the number of such d is 3, while A225867(33)= 6. Therefore, a(33) > 2. Consider now k = 3. Divisors>1 of 33 + 3 = 36 are 2,3,4,6,9,12,18,36, but only for d = 3,6,9,12,18,36, 33 + d is divisible by k = 3. Since we have exactly A225867(33) = 6 such divisors, then k = 3 is required and a(33) = 3.
MAPLE
A226182 := proc(n)
local ak, k, nd, kpiv ;
ak := 0 ;
kpiv := 2 ;
for k from 2 to n/2-1 do
nd := 0 ;
for d in numtheory[divisors](n+k) minus {1} do
if modp(n+d, k) = 0 then
nd := nd+1;
end if;
end do:
if nd > ak then
ak := max(ak, nd) ;
kpiv := k ;
end if;
end do:
kpiv ;
end proc: # R. J. Mathar, Jul 04 2013
MATHEMATICA
Table[NestWhile[#+1&, 2, Max[Map[Count[(n+Rest[Divisors[n+#]])/#, _Integer]&, Range[2, Floor[(n-2)/2]]]]-Count[(n+Rest[Divisors[n+#]])/#, _Integer] =!= 0&], {n, 6, 55}] (* Peter J. C. Moses, Jun 03 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 30 2013
STATUS
approved