back to list

More on Calkin-Wilf

🔗genewardsmith <genewardsmith@sbcglobal.net>

1/2/2013 8:08:05 AM

People may recall I asked about potential music uses of the Calkin-Wilf sequence, this is some thoughts on that.

Recall that Calkin-Wilf enumerates the positive rationals. If we first define fusc(n) by fusc(0)=0, fusc(1)=1, fusc(n)=fusc(n/2) for n even and fusc(n)=fusc((n-1)/2)+fusc((n+1)/2) for n odd, then CalkinWilf(n) = fusc(n)/fusc(n+1). We may also use

CalkinWilf(n+1) = 1/(2 floor(CalkinWilf(n)) - CalkinWilf(n) + 1)

Similarly, we may enumerate just the octave (or equivalently, pitch classes) by OCW(n) = (2 fusc(n) + fusc(n+1))/(fusc(n) + fusc(n+1)), where now 1 <= OCW(n) < 2. This sequence goes 1, 3/2, 4/3, 5/3, 5/4, 8/5, 7/5, 7/4, 6/5, 11/7, 11/8 ... . WE can use this to make a Calkin-Wilf version of the dwarf scale for a val, where now we pick the first sequence element q with v(q)=n for the nth scale value. This runs into the problem that OCW(n) strongly doesn't want to be near 1, and to a lesser extent, near 2. However the Calkin-Wilf number for these have factors of a high power of 2 near 1, and one plus the number has power of two factors, to lesser extent, near 2, making them easier to find. This however raises the question of inverting CalkinWilf(n) or OCR(n). The inverse of CalkinWilf, which is a peculiar sort of height function of a kind, is given by the following Maple code:

calkinv := proc(q)
# inverse CalkinWilf
local i, j, t, x;
i := numer(q);
j := denom(q);
x := 0;
t := -1;
while not i*j = 1 do
t := t+1;
if i>j then
i := i-j;
x := x+2^t;
else j := j-i fi od;
x+2^(t+1) end:

Then the inverse of OCW is OCWinv(q) = calkinv((q-1)/(2-q)).

Here are some Calkin-Wilf epimorphic scales:

! cw12_5.scl
!
CalkinWilf(<12 19 28|) = ariel1
12
!
27/25
9/8
6/5
5/4
4/3
25/18
3/2
8/5
5/3
9/5
15/8
2/1

! cw12_7.scl
!
CalkinWilf(<12 19 28 34|) = hahn12
12
!
15/14
8/7
6/5
5/4
4/3
7/5
3/2
8/5
5/3
7/4
15/8
2/1

! cw12_11.scl
!
CalkinWilf(<12 19 28 34 42|)
12
!
12/11
8/7
6/5
5/4
4/3
7/5
3/2
8/5
5/3
7/4
11/6
2/1

! cw15_5.scl
!
CalkinWilf(<15 23 35|) = cifariello
15
!
16/15
10/9
9/8
6/5
5/4
4/3
25/18
36/25
3/2
8/5
5/3
16/9
9/5
15/8
2/1

! cw15_7.scl
!
CalkinWilf(<15 23 35 42|) = hahn15
15
!
16/15
10/9
7/6
6/5
5/4
4/3
7/5
10/7
3/2
8/5
5/3
7/4
9/5
15/8
2/1

! cw19_5.scl
!
CalkinWilf(<19 30 44|)
19
!
135/128
27/25
9/8
75/64
6/5
5/4
32/25
4/3
25/18
36/25
3/2
25/16
8/5
5/3
128/75
9/5
15/8
48/25
2/1
! cw19_7.scl
!
CalkinWilf(<19 30 44 53|)
19
!
21/20
35/32
9/8
7/6
6/5
5/4
9/7
4/3
7/5
10/7
3/2
14/9
8/5
5/3
7/4
9/5
15/8
40/21
2/1

! cw19_11.scl
!
CalkinWilf(<19 30 44 53 66|)
19
!
35/33
12/11
9/8
7/6
6/5
5/4
9/7
4/3
7/5
10/7
3/2
14/9
8/5
5/3
7/4
9/5
11/6
40/21
2/1

🔗genewardsmith <genewardsmith@sbcglobal.net>

1/2/2013 7:35:34 PM

--- In tuning-math@yahoogroups.com, "genewardsmith" <genewardsmith@...> wrote:

> calkinv := proc(q)
> # inverse CalkinWilf
> local i, j, t, x;
> i := numer(q);
> j := denom(q);
> x := 0;
> t := -1;
> while not i*j = 1 do
> t := t+1;
> if i>j then
> i := i-j;
> x := x+2^t;
> else j := j-i fi od;
> x+2^(t+1) end:

for each finitely generated group G of positive rationals, and particular for any p-limit, we can form the sum

dense(G) = sum_{q in G} 1/calkinv(q)

which will converge. What the heck does this tell us?

🔗Mike Battaglia <battaglia01@gmail.com>

1/3/2013 12:50:20 AM

On Wed, Jan 2, 2013 at 11:08 AM, genewardsmith
<genewardsmith@sbcglobal.net> wrote:
>
> This runs into the problem that OCW(n) strongly doesn't want to be near 1, and to a lesser extent, near 2.

Why, practically speaking, is this a problem?

> However the Calkin-Wilf number for these have factors of a high power of 2 near 1, and one plus the number has power of two factors, to lesser extent, near 2, making them easier to find.

What is the "Calkin-Wilf number," and when you say "the Calkin-Wilf
number for *these* ...", what are the "these" that you're speaking of?

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

1/3/2013 12:53:03 AM

On Wed, Jan 2, 2013 at 10:35 PM, genewardsmith <genewardsmith@sbcglobal.net>
wrote:
>
> for each finitely generated group G of positive rationals, and particular
> for any p-limit, we can form the sum
>
> dense(G) = sum_{q in G} 1/calkinv(q)
>
> which will converge. What the heck does this tell us?

1) How did you come up with this sum?
2) How do you know that it converges?
3) Do you know of a way to compute this expression for an arbitrary group?
4) Is there a well-known name for this dense(G) function in the literature?
5) Do you know if it gives different results for 4.3.5, 2.9.5, and 2.3.25?

-Mike

🔗genewardsmith <genewardsmith@sbcglobal.net>

1/3/2013 6:56:30 AM

--- In tuning-math@yahoogroups.com, Mike Battaglia wrote:
>
> On Wed, Jan 2, 2013 at 11:08 AM, genewardsmith
> wrote:
> >
> > This runs into the problem that OCW(n) strongly doesn't want to be near 1, and to a lesser extent, near 2.
>
> Why, practically speaking, is this a problem?

Because if you just step through the numbers one at a time, it will take you a really long time to get to the comma-sized intervals, or even the step sizes. For instance, calkoct(4096)=15/14, which is 119.443 cents, and calkoct(2048)=14/13, which is 128.298 cents. If you
want a scale step between 119.443 and 128.298 cents, you need to look at numbers of the form 4096n where n is odd. That's not so bad, but already calkoct(2^22)=25/24 is a problem, and as for calkoct(2^33)=36/35, forget about it. But instead of all that you can take an interated Cps of a p-limit diamond, and step through that.

> What is the "Calkin-Wilf number,"

The integer argument n of CalkinWilf(n). The nth positive rational, in othr words.

🔗genewardsmith <genewardsmith@sbcglobal.net>

1/3/2013 7:02:08 AM

--- In tuning-math@yahoogroups.com, Mike Battaglia wrote:

> 1) How did you come up with this sum?

I was trying to think of a density measure for JI groups.

> 2) How do you know that it converges?

After a while, CalkinWilf(n) where n is the nth p-limit or whatever element starts to grow exponentially.

> 3) Do you know of a way to compute this expression for an arbitrary group?

Other than brute force, a PITA, no.

> 4) Is there a well-known name for this dense(G) function in the literature?

No. I doubt very much it's been considered.

> 5) Do you know if it gives different results for 4.3.5, 2.9.5, and 2.3.25?

It does.