%I #19 Nov 04 2014 22:39:52
%S 0,2,1,9,3,21,6,38,10,60,15,87,112,28,148,36,189,45,235,55,286,66,342,
%T 78,403,91,469,105,540,120,616,136,697,153,783,171,874,190,970,210,
%U 1071,231,1177,253,1288,276,1404,300,1525,325,1651,351,1782,378,1918,406,2059,435,2205,465
%N Sequence of distinct least nonnegative numbers such that the average of the first n terms is a triangular number.
%C Similar to A248983 except a(1) = 0, the zeroth triangular number.
%C Note that the sum of the first 12 terms is 252. Also, one can show that (252+sum_{i=7..n}(A000566(n)+A000217(n)))/(2*n) = n*(n+1)/2. So, for n > 6, if a(2*k-1) = A000566(k) and a(2*k-2) = A000217(k) for all 6 < k <= n, then a(2*n) = n*(n+1)/2.
%C Similarly, for n > 6, if a(2*k-1) = A000566(k) and a(2*k) = A000217(k) for all 6 < k <= n, then a(2*n+1) = A000566(n).
%F Empirical g.f.: x^2*(66*x^16-66*x^15-153*x^14+153*x^13+91*x^12-91*x^11-3*x^2-x-2) / ((x-1)^3*(x+1)^3). - _Colin Barker_, Oct 24 2014
%F Conjectured: For n > 6, a(2*n-1) = A000566(n) and a(2*n) = A000217(n).
%o (PARI) v=[]; n=0; while(n<5000, num=(vecsum(v)+n); if(num%(#v+1)==0&&vecsearch(vecsort(v),n)==0,for(i=0,n,if(i*(i+1)/2>(num/(#v+1)), break); if(i*(i+1)/2==(num/(#v+1)), print1(n, ", "); v=concat(v, n); n=0; break))); n++)
%Y Cf. A000217, A248983.
%K nonn
%O 1,2
%A _Derek Orr_, Oct 23 2014