login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Sequence of distinct least nonnegative numbers such that the average of the first n terms is a square.
1

%I #14 Nov 07 2014 00:11:41

%S 0,2,1,13,4,34,9,65,16,106,25,157,36,218,49,289,64,370,81,461,100,562,

%T 121,673,144,794,169,925,196,1066,225,1217,256,1378,1514,324,1693,361,

%U 1882,400,2081,441,2290,484,2509,529,2738,576,2977,625,3226,676,3485,729,3754,784,4033,841

%N Sequence of distinct least nonnegative numbers such that the average of the first n terms is a square.

%o (PARI) v=[]; n=0; while(n<10^4, num=(vecsum(v)+n); if(num%(#v+1)==0&&vecsearch(vecsort(v), n)==0, for(i=0, n, if(i^2>(num/(#v+1)), break); if(i^2==(num/(#v+1)), print1(n, ", "); v=concat(v, n); n=0; break))); n++)

%Y Cf. A085047.

%K nonn

%O 1,2

%A _Derek Orr_, Nov 05 2014