login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225867
a(n) = max_{2<=k<=(n-2)/2} sum_{d>1: d|n+k, k|n+d}1.
7
3, 2, 2, 3, 4, 1, 3, 3, 4, 4, 3, 2, 4, 3, 4, 4, 6, 2, 3, 4, 4, 4, 4, 2, 5, 3, 3, 6, 6, 4, 4, 4, 6, 4, 4, 2, 4, 5, 6, 5, 8, 2, 3, 4, 4, 6, 4, 3, 6, 6, 4, 6, 8, 2, 5, 5, 6, 4, 4, 4, 6, 4, 6, 8, 9, 2, 4, 5, 4, 5, 6, 6, 8, 4, 4, 6, 8, 3, 4, 6, 6, 8, 6, 3, 5, 4, 8, 6, 10
OFFSET
6,1
LINKS
MAPLE
A225867 := proc(n)
local a, k, nd ;
a := 0 ;
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:
a := max(a, nd) ;
end do:
a ;
end proc: # R. J. Mathar, Jul 04 2013
MATHEMATICA
Table[Max[Map[Count[(n+Rest[Divisors[n+#]])/#, _Integer]&, Range[2, Floor[(n-2)/2]]]], {n, 6, 105}] (* Peter J. C. Moses, Jun 27 2013 *)
PROG
(PARI) a(n)=my(t); for(k=2, n\2-1, t=max(sumdiv(n+k, d, (n+d)%k==0 && d>1), t)); t \\ Charles R Greathouse IV, Nov 25 2014
CROSSREFS
Sequence in context: A115061 A217834 A227877 * A046822 A129001 A029246
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 18 2013
EXTENSIONS
Extended from a(14) by Peter J. C. Moses, May 18 2013
STATUS
approved