cp's OEIS Frontend

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.

A118383 Unrefined Orloj clock sequences; row n sums to n.

This page as a plain text file.
%I A118383 #8 Feb 03 2018 09:14:32
%S A118383 1,1,1,1,2,1,1,1,1,1,2,2,1,2,1,2,1,2,3,1,1,1,1,1,1,1,1,1,1,2,3,3,1,2,
%T A118383 2,1,2,2,1,2,1,2,4,1,1,2,1,2,1,2,1,2,1,1,1,3,2,2,3,1,2,3,1,1,2,3,1,1,
%U A118383 2,3,4,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,4,1,4,2,1,2,3,3,1,2,3
%N A118383 Unrefined Orloj clock sequences; row n sums to n.
%C A118383 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 unrefined sequence whose values sum to each n; all other Orloj clock sequences summing to n can be obtained by refining this one. Refining means splitting one or more terms into values summing to that term. (The unrefined sequence for n = 2^k*(2m-1) is the sequence for 2m-1 repeated 2^k times, but any single refinement - possible unless m = 1 - will produce an aperiodic sequence summing to n.) The Orloj clock sequence is the one summing to 15: 1,2,3,4,3,2, with a beautiful up and down pattern.
%H A118383 Wikipedia, <a href="https://en.wikipedia.org/wiki/Prague_astronomical_clock">Prague astronomical clock</a>
%F A118383 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. The sequence for 2n is the sequence for n repeated.
%e A118383 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 A118383 The array starts:
%e A118383 1;
%e A118383 1, 1;
%e A118383 1, 2;
%e A118383 1, 1, 1, 1;
%e A118383 1, 2, 2;
%e A118383 1, 2, 1, 2;
%e A118383 1, 2, 3, 1.
%o A118383 (PARI) {Orloj(n) = my(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}
%o A118383 for (n=1,10,print(Orloj(n)))
%Y A118383 Cf. A028355, A118382.
%Y A118383 Length of row n is A117484(n).
%K A118383 nonn,tabf
%O A118383 1,5
%A A118383 _Franklin T. Adams-Watters_, Apr 26 2006