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.

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