Wednesday, January 29, 2025

[uwyfatlb] golden portions of an hour

60/37 = 1.621621 is a good approximation to phi, the golden ratio, and 60 and 37 are nicely relatively prime.  below are multiples of 37 mod 60, creating a permutation of 0-59.

(the repeat period of the decimal expansion of 1/37 is 3 because 37*27 = 999.)

motivation was cronjobs to be run on a specified minute once an hour.  which minute?  different jobs should be assigned different minutes, and they should be spread out, even if we do not know in advance how many jobs there will be.

? for(i=0, 59, print(i" ", (37*i)%60))

0 0
1 37
2 14
3 51
4 28
5 5
6 42
7 19
8 56
9 33
10 10
11 47
12 24
13 1
14 38
15 15
16 52
17 29
18 6
19 43
20 20
21 57
22 34
23 11
24 48
25 25
26 2
27 39
28 16
29 53
30 30
31 7
32 44
33 21
34 58
35 35
36 12
37 49
38 26
39 3
40 40
41 17
42 54
43 31
44 8
45 45
46 22
47 59
48 36
49 13
50 50
51 27
52 4
53 41
54 18
55 55
56 32
57 9
58 46
59 23

previously, logarithmically evenly spaced portions of 60, when you know in advance how many portions.

No comments:

Post a Comment