%I #13 Jul 24 2018 13:08:07
%S 0,0,3,0,10,12,21,0,36,30,55,60,78,70,105,0,136,108,171,180,210,176,
%T 253,240,300,234,351,168,406,420,465,0,528,408,595,252,666,532,741,
%U 480,820,840,903,880,990,782,1081,1008,1176,900,1275,1248,1378,1080,1485,1512
%N Greatest multiple of n of the form (n-1) + (n-2) + ... + (n-k), or 0 if no such number exists.
%C a(2n-1) = (n-1)*(2n-1) (the (2n-2)-th triangular number, with k = 2n-2). a(2^n) = 0.
%H Harvey P. Dale, <a href="/A095200/b095200.txt">Table of n, a(n) for n = 1..1000</a>
%e a(6) = 5 + 4 + 3 = 12.
%e a(7) = 6 + 5 + 4 + 3 + 2 + 1 = 21.
%p A095200 := proc(n) local k,m; for k from n to 1 by -1 do m := n*k-k*(k+1)/2 ; if m > 0 and m mod n = 0 then RETURN(m) ; fi ; od ; RETURN(0) ; end: for n from 1 to 100 do printf("%d, ",A095200(n)) ; od ; # _R. J. Mathar_, Apr 30 2007
%t Table[Max[Select[Accumulate[Range[n-1,1,-1]],Divisible[#,n]&]],{n,60}]/.(-\[Infinity]->0) (* _Harvey P. Dale_, Jul 24 2018 *)
%Y Cf. A095201, A095202.
%K nonn
%O 1,3
%A _Amarnath Murthy_, Jun 05 2004
%E More terms from _R. J. Mathar_, Apr 30 2007