A225867 a(n) = max_{2<=k<=(n-2)/2} sum_{d>1: d|n+k, k|n+d}1.
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
Keywords
Links
- Peter J. C. Moses, Table of n, a(n) for n = 6..10005
Programs
-
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 *)
-
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
Extensions
Extended from a(14) by Peter J. C. Moses, May 18 2013