OFFSET
27,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 27..4308
Wikipedia, Piano Key Frequencies
Wikipedia, Twelfth root of two
FORMULA
a(n) = round(12*log_2(n/440)) + 49, 27 <= n <= 4308.
a(A214832(k)) = k for k = 1..88.
EXAMPLE
. | 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 .
PROG
(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
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Reinhard Zumkeller, Feb 01 2015
EXTENSIONS
Corrected by Jianing Song, Oct 14 2019
STATUS
approved