cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A060528 A list of equal temperaments (equal divisions of the octave) whose nearest scale steps are closer and closer approximations to the ratios of two tones of musical harmony: the perfect 4th, 4/3 and its complement the perfect 5th, 3/2.

Original entry on oeis.org

1, 2, 3, 5, 7, 12, 29, 41, 53, 200, 253, 306, 359, 665, 8286, 8951, 9616, 10281, 10946, 11611, 12276, 12941, 13606, 14271, 14936, 15601, 31867, 79335, 111202, 190537, 5446238, 5636775, 5827312, 6017849, 6208386, 6398923, 6589460, 6779997, 6970534, 7161071
Offset: 1

Views

Author

Mark William Rankin (MarkRankin95511(AT)Yahoo.com), Apr 12 2001

Keywords

Comments

The sequence was found by a computer search of all the equal divisions of the octave from 1 to over 6589460. This is not a perfect recurrent sequence because its self-accumulating nature fails between the 9th and 10th terms, between the 14th and 15th terms, and between the 30th and 31st terms. The examples of recurrence which are present in this sequence are of the same type that is seen in sequences A054540, A060526 and A060527. The numerical value of each term represents a musical scale based on an equal division of the octave. 12, for example, signifies the scale which is formed by dividing the octave into 12 equal parts. - corrected by K. G. Stier, Jan 29 2015
Also the denominators of increasingly better rational approximations to log(3)/log(2) = 1.5849625... (see A020857). The respective numerators are A254351. The reason why the sequence's "self-accumulating nature fails between the 9th and 10th terms, the 14th and 15th terms and the 30th and 31st terms" (see original comment) is simply that 84/53, 1054/665 and 301994/190537 are very good approximations, thus followed by a jump. (E.g., this phenomenon can also be seen in the numerators and denominators of rational approximations to Pi.). - K. G. Stier, Jan 29 2015

Crossrefs

A005664 is a subsequence, A206788 is a supersequence.

Programs

  • Maxima
    x:bfloat(log(3)/log(2)),fpprec:100, errold:2,for denominator:1 thru 10000 do (numerator:round(x*denominator), errnew:abs(x-numerator/denominator), if errnew < errold then (errold:errnew, print(denominator))); /* K. G. Stier, Jan 29 2015 */
    
  • PARI
    lista(nn) = {d = 2; v = log(3)/log(2); for (den=1, nn, num = round(v*den); newd = abs(v-num/den); if (newd < d, print1(den, ", "); d = newd;););} \\ after Maxima, Michel Marcus, Feb 28 2015

Extensions

Incorrect term 571611 removed by K. G. Stier, Jan 29 2015
More terms from Jon E. Schoenfield, Feb 06 2015

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Views

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });

A328883 Denominators of the best rational approximations of log(6/5)/log(2).

Original entry on oeis.org

1, 2, 3, 4, 11, 15, 19, 232, 251, 270, 289, 308, 327, 346, 365, 384, 403, 422, 1285, 1707, 2129, 3836, 28981, 32817, 36653, 40489, 44325, 48161, 51997, 3591629, 3643626, 3695623, 3747620, 3799617, 3851614, 3903611, 3955608, 4007605, 4059602, 4111599, 4163596, 4215593
Offset: 1

Views

Author

Daniel Hoyt, Oct 29 2019

Keywords

Comments

A list of equal temperaments (equal divisions of the octave) whose nearest scale steps are closer and closer approximations to the ratios of two tones of musical harmony: the minor third, 6/5 and its complement the major sixth, 5/3.
The numerical value of each term represents a musical scale based on an equal division of the octave. 19, for example, signifies the scale which is formed by dividing the octave into 19 equal parts.
The 19 equal temperament, first proposed and used by Guillaume Costeley in the 16th century, uses 19 equally spaced tones, offering better major thirds and far better minor thirds than normal 12-semitone equal temperament at the cost of a flatter fifth.

Crossrefs

Programs

  • Python
    import decimal
    from math import floor
    from decimal import Decimal as D
    from collections import namedtuple
    def continued_fraction(x, k):
        cf = []
        q = floor(x)
        cf.append(q)
        x = x - q
        i = 0
        while x != 0 and i < k:
            q = floor(1 / x)
            if q > k:
                break
            cf.append(q)
            x = 1 / x - q
            i += 1
        return cf
    def best_rational_approximation(clist, app):
        hn0, kn0 = 0, 1
        hn1, kn1 = 1, 0
        ran, rad = 0, 0
        conlist, finallist = [], []
        fraction = namedtuple("fraction", "ratio, denom")
        for n in clist:
            for i in range(1, n + 1):
                ran = hn0 + (i * hn1)
                rad = kn0 + (i * kn1)
                try:
                    if D.copy_abs(app-D(ran)/D(rad)) < D.copy_abs(app-D(hn1)/D(kn1)):
                        conlist.append(fraction(f'{ran}/{rad}', rad))
                except:
                    pass
            hn2 = (n * hn1) + hn0
            kn2 = (n * kn1) + kn0
            conlist.append(fraction(f'{hn2}/{kn2}', kn2))
            hn0, kn0 = hn1, kn1
            hn1, kn1 = hn2, kn2
        #Change x.denom to x.ratio for the full ratio as a string
        finallist = [ x.denom for x in sorted(conlist, key=lambda i: i.denom) ]
        return list(dict.fromkeys(finallist))
    if _name_ == "_main_":
        prec = 200
        decimal.getcontext().prec = prec
        value = D(6/5).ln()/D(2).ln()
        vc = continued_fraction(value, prec)
        print(', '.join([str(x) for x in best_rational_approximation(vc, value)]))
Showing 1-3 of 3 results.