%I #29 Jan 30 2024 20:07:25
%S 0,1,1,2,2,3,4,4,5,5,6,7,7,8,8,9,9,10,11,11,12,12,13,14,14,15,15,16,
%T 16,17,18,18,19,19,20,21,21,22,22,23,23,24,25,25,26,26,27,28,28,29,29,
%U 30,31,31,32,32,33,33,34,35,35,36,36,37,38,38,39,39,40,40,41,42,42,43,43
%N ((3/2)^n)/2^a(n) lies in the half-open interval [1,2).
%C Stacking perfect fifths (the frequency ratio of a fifth is 3/2), a division by 2^a(n) leads the equivalent tone belonging to the first octave interval [1,2). For example, the third fifth, (3/2)^3, falls into the second octave. This means it lies in the interval [2^1,2^2)=[2,4). Hence ((3/2)^3)/2^1 belongs to the first octave, the interval [1,2).
%C This sequence coincides for the first 93 term with the floor of y(n)= 4*Pi*log(phi)*n/(Pi^2 + (2*log(phi)^2)), with phi:=(1+sqrt(5))/2. a(n) = floor(y(n)), for n=1..93. Note that y(n) is not the imaginary part of the zero of the Fibonacci function because of a different bracket setting. See A214656. - _Wolfdieter Lang_, Jul 24 2012
%H Handbook for Acoustic Ecology, <a href="https://www.sfu.ca/sonic-studio-webdav/handbook/Pythagorean_Scale.html">Pythagorean Scale</a>.
%H Eric Weisstein's World of Music, <a href="http://www.ericweisstein.com/encyclopedias/music/PythagoreanScale.html">Pythagorean Scale</a>
%F a(n) = A098294(n)-1, n >= 1.
%F a(n) = ceiling(tau*n)-1 with tau = log(3)/log(2)-1 = 0.58496250072..., n >= 1.
%F a(n) = A056576(n) - n. - _Ruud H.G. van Tol_, Jan 26 2024
%e (3/2)^12 lies in the eighth octave [2^7,2^8) and
%e ((3/2)^12)/2^a(12)= ((3/2)^12)/2^7 = 3^12/2^19 = 531441/524288 = 1.01363... belongs to the first octave [1,2). This ratio is called the Pythagorean comma.
%o (PARI) a(n) = logint(3^n, 2) - n; \\ _Ruud H.G. van Tol_, Jan 26 2024
%Y This sequence differs from A074840 for the first time at entry a(41)=23: A074840(41)=24.
%Y Cf. A020857, A056576, A098294, A214656.
%K nonn,easy
%O 1,4
%A _Wolfdieter Lang_, Oct 18 2004