A118382 Primitive Orloj clock sequences; row n sums to 2n-1.
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, 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, 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
Offset: 1
Examples
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. The array starts: 1; 1,2; 1,2,2; 1,2,3,1; 1,2,3,3; 1,2,1,2,4,1; ...
Links
- Michal Krížek, Alena Šolcová and Lawrence Somer, Construction of Šindel sequences, Comment. Math. Univ. Carolin., 48 (2007), 373-388.
Programs
-
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}
Formula
Let b(i),0<=i
A118383 Unrefined Orloj clock sequences; row n sums to n.
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, 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, 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
Offset: 1
Comments
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.
Examples
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. The array starts: 1; 1, 1; 1, 2; 1, 1, 1, 1; 1, 2, 2; 1, 2, 1, 2; 1, 2, 3, 1.
Links
- Wikipedia, Prague astronomical clock
Programs
-
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} for (n=1,10,print(Orloj(n)))
Formula
Let b(i),0<=i
A343713 Table read by rows: row n lists the residues of the triangular numbers modulo n.
0, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 3, 0, 1, 3, 4, 0, 1, 3, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 3, 6, 0, 1, 3, 5, 6, 8, 0, 1, 3, 4, 6, 10, 0, 1, 3, 4, 6, 7, 9, 10, 0, 1, 2, 3, 6, 8, 10, 0, 1, 3, 6, 7, 8, 10, 13, 0, 1, 3, 6, 10, 13, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Offset: 1
Comments
A117484(n) is the number of terms in row n.
Examples
Table begins: row terms --- ----------------------------- 1 0 2 0, 1 3 0, 1 4 0, 1, 2, 3 5 0, 1, 3 6 0, 1, 3, 4 7 0, 1, 3, 6 8 0, 1, 2, 3, 4, 5, 6, 7 9 0, 1, 3, 6 10 0, 1, 3, 5, 6, 8 11 0, 1, 3, 4, 6, 10 12 0, 1, 3, 4, 6, 7, 9, 10 13 0, 1, 2, 3, 6, 8, 10 14 0, 1, 3, 6, 7, 8, 10, 13 15 0, 1, 3, 6, 10, 13
A376931 Number of points out of n points placed on a circle that can never be reached when starting at one point and then moving clockwise in incrementally increasing steps (first 1, then 2, 3, 4, ...).
0, 0, 1, 0, 2, 2, 3, 0, 5, 4, 5, 4, 6, 6, 9, 0, 8, 10, 9, 8, 13, 10, 11, 8, 14, 12, 16, 12, 14, 18, 15, 0, 21, 16, 23, 20, 18, 18, 25, 16, 20, 26, 21, 20, 33, 22, 23, 16, 27, 28, 33, 24, 26, 32, 37, 24, 37, 28, 29, 36, 30, 30, 47, 0, 44, 42, 33, 32, 45, 46, 35
Offset: 1
Keywords
Comments
Put n distinct points on the edge of a circle. Connect the first to the point 1 step clockwise from it, then connect that one to the point 2 steps clockwise from that, continuing with 3 steps, 4 steps, etc. In the end, a(n) is the number of points never landed on.
Crossrefs
Cf. A117484.
Formula
a(n) = n - A117484(n).
A380036 Smallest number which is not a triangular number mod n.
1, 2, 2, 4, 2, 2, 2, 8, 2, 2, 2, 2, 4, 2, 2, 16, 5, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 32, 2, 5, 2, 2, 2, 4, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 64, 2, 2, 5, 5, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 7, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 4
Offset: 1
Keywords
Comments
a(n) is the smallest nonnegative integer not in row n of A343713. - Pontus von Brömssen, Jan 11 2025
Examples
For n=5, the triangular numbers mod 5 are the set {0,1,3} and the smallest number not in that set is a(5) = 2.
Programs
-
Maple
f:= proc(n) local k; if n = 2^padic:-ordp(n,2) then return n fi; for k from 2 to n-1 do if NumberTheory:-QuadraticResidue(1+8*k,2*n)=-1 then return k fi od: FAIL end proc: map(f, [$1..200]); # Robert Israel, Jan 10 2025
-
PARI
a(n)=setminus([1..n], Set(vector(n,k,k*(k-1)/2)%n))[1] \\ Andrew Howroyd, Jan 10 2025
Comments