login
A221617
Number of 12-hour periods after which the (27+n) balls of a ball clock return to their initial state.
1
25, 27, 84, 380, 138, 24, 180, 140, 330, 627, 1190, 200, 252, 420, 399, 1020, 6160, 74, 148, 360, 47, 5460, 870, 1160, 748, 1508, 680, 147, 1260, 1596, 1092, 3220, 140, 57, 270, 2436, 440, 840, 62, 177, 1260, 840, 54, 4641, 244, 21840, 228, 644, 1320, 3795, 1980, 4620, 2976, 34410, 12012, 550, 5700, 12243, 1155, 120120, 249
OFFSET
0,1
COMMENTS
The clock has 3 bars with lengths 5, 11, 11. So the minimal number of balls is (5+11+11) + 1 = 27. But it can also operate with more balls, hence the (27+n) in sequence name.
To get the above data, first call PARI script clock() (A221616) with n = 0, 1, ..., and send the result into the orderp() script below. The order of a permutation is computed with the LCM of cycle sizes.
LINKS
ACM International Collegiate Programming Contest, 1995 ACM-ICPC World Finals Problems
Jim Weigang, Ball Clock Problem
PROG
(PARI) orderp(v) = {nv = length(v); vbp = vector(nv); ordr = 1; for (i=1, nv, if (vbp[i] == 0, cpt = 0; j = i; while (vbp[j] == 0, nextj = v[j]; vbp[j] = 1; j = nextj; cpt++; ); ordr = lcm(ordr, cpt); ); ); return(ordr); }
CROSSREFS
Cf. A221616.
Sequence in context: A096522 A195351 A015734 * A083806 A239521 A345509
KEYWORD
nonn
AUTHOR
Michel Marcus, Jan 21 2013
STATUS
approved