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-2 of 2 results.

A214832 Integer part of A440 piano key frequencies, start with A0 = the 1st key.

Original entry on oeis.org

27, 29, 30, 32, 34, 36, 38, 41, 43, 46, 48, 51, 55, 58, 61, 65, 69, 73, 77, 82, 87, 92, 97, 103, 110, 116, 123, 130, 138, 146, 155, 164, 174, 184, 195, 207, 220, 233, 246, 261, 277, 293, 311, 329, 349, 369, 391, 415, 440, 466, 493, 523, 554, 587, 622, 659, 698, 739, 783, 830, 880, 932, 987, 1046, 1108, 1174, 1244, 1318, 1396, 1479, 1567, 1661, 1760, 1864, 1975, 2093, 2217, 2349, 2489, 2637, 2793, 2959, 3135, 3322, 3520, 3729, 3951, 4186
Offset: 1

Views

Author

Jon Perry, Mar 07 2013

Keywords

Comments

A254531(a(k)) = k, k = 1..88. - Reinhard Zumkeller, Feb 04 2015

Examples

			Middle C is 261.626 Hz so a(40) = 261.
		

Crossrefs

Programs

  • Haskell
    a214832 = floor . (* 440) . (2 **) . (/ 12) . fromIntegral . subtract 49
    -- Reinhard Zumkeller, Nov 23 2014
  • JavaScript
    for (i=1;i<=88;i++) document.write(Math.floor(Math.pow(2,(i-49)/12)*440)+", ");
    
  • PARI
    a(n)=floor(440*2^((n-49)/12));
    

Formula

a(n) = floor[2^((n-49)/12)*440] (Hz) for 1 <= n <= 88.

A254531 a(n) is the position of the piano key whose frequency is closest to n Hz, start with A0 = the 1st key.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22
Offset: 27

Views

Author

Reinhard Zumkeller, Feb 01 2015

Keywords

Examples

			.     | Frequency [Hz] | Piano key | Pitch
.   i | f = A079731(i) |      a(f) |
.  ---+----------------+-----------+------
.   0 |             28 |         1 |  A0
.   1 |             55 |        13 |  A1
.   2 |            110 |        25 |  A2
.   3 |            220 |        37 |  A3
.   4 |            440 |        49 |  A4    A440
.   5 |            880 |        61 |  A5
.   6 |           1760 |        73 |  A6
.   7 |           3520 |        85 |  A7 .
		

Crossrefs

Programs

  • Haskell
    a254531 = (+ 49) . round . (* 12) . logBase 2 . (/ 440) . fromIntegral
    
  • PARI
    a(n) = round(12*log(n/440)/log(2))+49 \\ Jianing Song, Oct 14 2019

Formula

a(n) = round(12*log_2(n/440)) + 49, 27 <= n <= 4308.
a(A214832(k)) = k for k = 1..88.

Extensions

Corrected by Jianing Song, Oct 14 2019
Showing 1-2 of 2 results.