This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A118382 #15 Sep 23 2019 07:03:02 %S A118382 1,1,2,1,2,2,1,2,3,1,1,2,3,3,1,2,1,2,4,1,1,1,1,3,2,2,3,1,2,3,4,3,2,1, %T A118382 1,1,1,2,4,1,4,2,1,1,1,3,1,2,1,5,2,2,1,2,3,1,3,3,2,6,1,2,2,1,3,1,3,2, %U A118382 5,1,1,1,1,2,2,1,4,1,4,1,4,1,4,1,2,3,3,1,2,3,3,3,3,3,1,2,1,2,1,1,2,5,1,2,2 %N A118382 Primitive Orloj clock sequences; row n sums to 2n-1. %C A118382 An Orloj clock sequence is a finite sequence of positive integers that, when iterated, can be grouped so that the groups sum to successive natural numbers. There is one primitive sequence whose values sum to each odd m; all other sequences can be obtained by repeating and refining these. Refining means splitting one or more terms into values summing to that term. The Orloj clock sequence is the one summing to 15: 1,2,3,4,3,2, with a beautiful up and down pattern. %C A118382 These are known in some papers as Sindel sequences. It appears that this sequence was submitted prior to the first such publication. %H A118382 Michal Krížek, Alena Šolcová and Lawrence Somer, <a href="https://dml.cz/dmlcz/119666">Construction of Šindel sequences</a>, Comment. Math. Univ. Carolin., 48 (2007), 373-388. %F A118382 Let b(i),0<=i<k be all the residues of triangular numbers modulo n in order, with b(k)=n. The differences b(i+1)-b(i) are the sequence for n. %e A118382 For a sum of 5, we have 1,2,2, which groups as 1, 2, 2+1, 2+2, 1+2+2, 1+2+2+1, .... This could be refined by splitting the second 2, to give the sequence 1,2,1,1; note that when this is grouped, the two 1's from the refinement always wind up in the same sum. %e A118382 The array starts: %e A118382 1; %e A118382 1,2; %e A118382 1,2,2; %e A118382 1,2,3,1; %e A118382 1,2,3,3; %e A118382 1,2,1,2,4,1; %e A118382 ... %o A118382 (PARI) {Orloj(n) = local(found,tri,i,last,r); found = vector(n,i,0); found[n] = 1; tri = 0; for(i = 1, if(n%2==0,n-1,n\2), tri += i; if(tri >= n, tri -= n); found[tri] = 1); last = 0; r = []; for(i = 1, n, if(found[i], r = concat(r, [i-last]); last = i)); r} %Y A118382 Cf. A028355, A118383. Length of row n is A117484(2n-1) = A000224(2n-1). %K A118382 nonn,tabf %O A118382 1,3 %A A118382 _Franklin T. Adams-Watters_, Apr 26 2006