A Niven number (or Harshad number, but I give priority to alliterations) is a positive integer which is divisible by the sum of its digits. So the first Niven numbers are
1 2 3 4 5 6 7 8 9 10 12 18 20 21 24 27 30 36 40 42.
The piece of music has four parts:
1) The treble part. The sum of each Niven numbers digits are mapped to the A alternating octatonic scale. The note values are determined by the digit sum of the next number. This sum will be the number of tied sixteenth notes. The first 153 Niven numbers were used.
2) A high bass part. The smallest digit sum of the quotient
(Niven number) / (digit sum of Niven number)
is mapped to the A alternating octatonic scale. For example, the quotient 29 has the digit sum 11 and the smallest digit sum is the digit sum of 11, which is 2. The note values are determined by the next such number. The first 269 Niven numbers were used.
3) A bass part. This part was determined by the Niven numbers concatenated. Digits 1 - 9 is the A alternating octatonic scale plus the octave and 0 is a pause. All note values are sixteenths. The first 284 Niven numbers were used.
4) Whenever consecutive Niven numbers also are consecutive integers, then the first part is doubled by this alto part.
Playing time: 3' 32".
The piece has three distinct parts, but the two treble parts depends on each other. The prime numbers are expressed in base 3 so the first 10 are
2 10 12 21 102 111 122 201 212 1002.
1) A bass part. The 3rd digits (i.e. the second digit from the right) of the first 941 prime numbers were used. The note values were determined by the number of consecutive prime numbers with the same 3rd digits. This value is the number of tied sixteenth notes and the number of scale steps relative to the previous tone. 0 is a pause, 1 means descend and 2 means ascend. The initial pitch is F so the first tone is G# (sixteenth).
2) A treble part determined by the unit digits of the prime numbers. For the 1st - 428th prime numbers the tones are determined the same way as the 1st part. It then pauses while the 3rd part is showing off and tooting its own horn. When the 3rd part is done with this, the 2nd part does the same using the 569th - 1002nd primenumbers in the following way: Start at F, 1 means descend a scale step, 2 means ascend a scale step (there are no zeros). When it's done, it doubles the 3rd part to the end.
3) For the 1st - 428th prime numbers, this part doubles the 2nd. Then between the 429th - 463rd prime numbers, it uses the whole prime numbers (they have 8 digits in this interval) concatenated. Starting at F, 0 and 2 means ascend a scale step, 1 means descend a scale step. When it's done, it hooks up at the prime number where the 1st part is at the monent (I forgot the exact number) and uses the same algorithm as the 2nd part had at the beginning of the piece. When the 2nd part is done showing off, the pitch jumps back to the default F, and then continues as before until the end.
Playing time: 2' 55".
The first 785 prime numbers over 4 octaves. All twin primes are played as double stops over a quarter note (and sometimes goes above the fourth octave because I didn't want them to be separated), all other primes are eighth notes. The notes are determined by p mod (29), where p is a prime number.
Playing time: 4' 04".
Primitive Pythagorean Triples
The first 135 primitive Pythagorean triples given by the following system was used for this piece, where the inital values for p and q are 2 and 1 respectively:
x = p2 - q2
y = 2pq
z = p2 + q2
where p > q, (p - q) is odd and p and q are relatively prime.So the first six triples are:
(3, 4, 5) (5, 12, 13) (15, 8,17) (7, 24, 24) (21, 20, 29) (9, 40, 41).
The piece of music has two parts.
1) The treble part is the Pythagorean numbers (mod 29), mapped to four octaves of the C Major scale.
2) Whenever the Pythagorean numbers (mod 29) are prime numbers a bass part over one octave doubles and sustains the tones of the first part until the next such number.
Playing time: 4' 41".