login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254531 a(n) is the position of the piano key whose frequency is closest to n Hz, start with A0 = the 1st key. 4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
27,3
LINKS
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
Sequence in context: A206916 A336112 A067086 * A005410 A120835 A091374
KEYWORD
nonn,fini,full
AUTHOR
Reinhard Zumkeller, Feb 01 2015
EXTENSIONS
Corrected by Jianing Song, Oct 14 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)