A074135
Triangle read by rows: for 1 <= k < n, a(n, k) is the least positive integer not already used. a(n, n) is the least positive integer not already used that makes the row sum a multiple of n.
Original entry on oeis.org
1, 2, 4, 3, 5, 7, 6, 8, 9, 13, 10, 11, 12, 14, 18, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 40, 36, 37, 38, 39, 41, 42, 43, 44, 49, 45, 46, 47, 48, 50, 51, 52, 53, 54, 64, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 75, 66, 67, 68, 69, 70, 71
Offset: 1
Further edited by
N. J. A. Sloane Jan 17 2009 at the suggestion of R. J. Mathar
A074133
Average of the n-th group, if positive integers are rearranged in groups of k=1,2,3,... numbers whose sum is a multiple of k.
Original entry on oeis.org
1, 3, 5, 9, 13, 18, 25, 33, 41, 51, 61, 72, 85, 99, 113, 128, 145, 163, 181, 200, 221, 243, 265, 288, 313, 339, 365, 393, 421, 450, 481, 513, 545, 578, 613, 649, 685, 722, 761, 801, 841, 882, 925, 969, 1013, 1058, 1105, 1153, 1201, 1250, 1301, 1353, 1405
Offset: 1
From _M. F. Hasler_, May 07 2010: (Start)
Below the groups are given inside /*...*/, followed by the average a(n):
/*[1]*/ 1,
/*[2, 4]*/ 3,
/*[3, 5, 7]*/ 5,
/*[6, 8, 9, 13]*/ 9,
/*[10, 11, 12, 14, 18]*/ 13,
/*[15, 16, 17, 19, 20, 21]*/ 18,
/*[22,23, 24, 25, 26, 27, 28]*/ 25,
/*[29, 30, 31, 32, 33, 34, 35, 40]*/ 33,
/*[36, 37, 38, 39, 41, 42, 43, 44, 49]*/ 41,
/*[45, 46, 47, 48, 50, 51, 52, 53, 54, 64]*/ 51,
/*[55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 75]*/ 61,
/*[66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 81]*/ 72, ... (End)
-
{v=vector(10000); print1(v[1]=1); for(n=2,80, s=0;i=1; for(k=1,n-1, while(v[i],i++); s+=i; v[i]=1); i=ceil(s/n)*n-s; while(! i||v[i], i+=n); s+=i; v[i]=1; print1(","s/n))}
-
/* Removing the code involving "show" considerably speeds up the computation */
A074133(n,show=0 /* 1:print terms 1..n, 2:print all groups */)={
my(t, u=0, lu=1 /* least unused */); for(k=1, n, my(v=[]); s=sum( i=1,k-1,
t=lu; while(bittest(u,t), t++); show>1 & v=concat(v,t); u+=1<1 & print1("/*"concat(v,n-s)"*/ ");
t=n/k; show & print1(t,", "); break));t} \\ M. F. Hasler, May 07 2010
A082018
First column of square array T(n,k) with T(1,1) = 1 where antidiagonals are filled alternating upwards and downwards with the smallest number not already used such that the n-th antidiagonal sum is a multiple of n.
Original entry on oeis.org
1, 4, 3, 13, 10, 21, 22, 40, 36, 64, 55, 81, 78, 115, 105, 138, 136, 182, 171, 211, 210, 265, 253, 300, 301, 364, 351, 433, 406, 477, 465, 556, 528, 606, 595, 695, 666, 751, 741, 850, 820, 912, 903, 1021, 990, 1089, 1081, 1208, 1176, 1282, 1275, 1411, 1378
Offset: 1
T(n,k) begins:
1, 2, 7, 6, 18, 15, ...
4, 5, 8, 14, 16, 27, ...
3, 9, 12, 17, 26, 31, ...
13, 11, 19, 25, 32, 42, ...
10, 20, 24, 33, 41, 50, ...
21, 23, 34, 39, 51, 60, ...
Showing 1-3 of 3 results.
Comments