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”).

Sequence of distinct least positive numbers such that the average of the first n terms is a factorial.
0

%I #4 Nov 07 2014 23:02:40

%S 1,3,2,18,6,114,24,792,120,6120,720,52560,5040,498960,40320,5201280,

%T 362880,59149440,3628800,729388800,39916800,9699782400,479001600,

%U 138431462400,6227020800,2110960051200,87178291200,34261068441600,1307674368000,589761139968000,20922789888000

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

%F a(2*n-1) = n!.

%F a(2*n) = n!*(2*n^2+1).

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

%K nonn

%O 1,2

%A _Derek Orr_, Nov 05 2014