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.
%I A098294 #80 Feb 24 2024 14:13:28 %S A098294 0,1,2,2,3,3,4,5,5,6,6,7,8,8,9,9,10,10,11,12,12,13,13,14,15,15,16,16, %T A098294 17,17,18,19,19,20,20,21,22,22,23,23,24,24,25,26,26,27,27,28,29,29,30, %U A098294 30,31,32,32,33,33,34,34,35,36,36,37,37,38,39,39,40,40,41,41,42,43,43,44 %N A098294 a(n) = ceiling(n*log_2(3/2)). %C A098294 Original name was: Smallest exponent of 2 which gives a power of 2 which is equal to or bigger than (3/2)^n, n = 0,1,... . %C A098294 Stacking perfect fifths (the frequency ratio of a fifth is 3/2) this sequence determines into which octave the n-th fifth falls. For example, the third fifth, (3/2)^3, falls into the second octave, which means that it lies in the interval [2^1,2^2)=[2,4). The k-th octave comprises ratios in the interval [2^(k-1),2^k), k=1,2,... %C A098294 Related to the initial number of sequential even terms in an "ideal" sequence under iteration of the 3x+1 Problem on a positive odd value m, where the piecewise function f is given by f(2*m)=m, f(2*m+1)=6*m+4, to ensure f^A122437(n) (m) < m, where n > 1 is the number of odds in the sequence (including m) and floor(1+n*(log(3)/log(2))) is the number of evens. An "ideal" sequence minimizes the effects of f(2*m+1) by following a certain order of even or odd terms along with the rules of the function. A representation of such sequences in terms of parity sequences for values n >= 2 follows: %C A098294 n=2, (o,e,e,o,e,e) %C A098294 n=3, (o,e,e,o,e,o,e,e) %C A098294 n=4, (o,e,e,e,o,e,o,e,o,e,e) %C A098294 n=5, (o,e,e,e,o,e,o,e,o,e,o,e,e) %C A098294 n=6, (o,e,e,e,e,o,e,o,e,o,e,o,e,o,e,e) %C A098294 n=7, (o,e,e,e,e,e,o,e,o,e,o,e,o,e,o,e,o,e,e) %C A098294 The pattern is clear, and the formula for the initial number of sequential even terms in each sequence is given by a(n) = floor(1+n*(log(3)/log(2)))-n for n > 1, where the sum of the number of even and odd terms is given by A122437(n) for n > 1. Of course, most values m do not have sequences following this pattern of iteration under f. Also, the reason for placing an extra even term at the end of such sequences is to mitigate to some degree the effects of the possibility that the last odd term is only "slightly" larger than m, i.e., (3*m+1)/4 < m for all m > 1. - _Jeffrey R. Goodwin_, Aug 25 2011 %C A098294 a(n) gives the position in n-th row of A227048 where (3^n - 2^n) occurs: %C A098294 A227048(n,a(n)) = A001047(n). - _Reinhard Zumkeller_, Jun 30 2013 %C A098294 Differs from A005378 at indices n = 0,17,20,22,25,27,29,30,... - _M. F. Hasler_, Jun 29 2014 %H A098294 Reinhard Zumkeller, <a href="/A098294/b098294.txt">Table of n, a(n) for n = 0..1000</a> %H A098294 Sonic Studio, <a href="http://www2.sfu.ca/sonic-studio/handbook/Pythagorean_Scale.html">Pythagorean Scale.</a> %H A098294 Eric Weisstein's World of Music, <a href="http://www.ericweisstein.com/encyclopedias/music/PythagoreanScale.html">Pythagorean Scale</a> %H A098294 Wikipedia, <a href="http://en.wikipedia.org/wiki/Pythagorean_tuning">Pythagorean tuning</a> %H A098294 Mike Winkler, <a href="http://mikewinkler.co.nf/collatz_structure_2014.pdf">On the structure and the behaviour of Collatz 3n + 1 sequences</a>, 2014. %F A098294 2^a(n) >= (3/2)^n but 2^(a(n) - 1) < (3/2)^n, n >= 0. %F A098294 a(n) = ceiling(tau*n) with tau := log(3)/log(2) - 1 = 0.584962501..., n >= 0. %F A098294 a(n) = floor(1 + n * log(3)/log(2)) - n, n >= 1. - _Mike Winkler_, Dec 31 2010 %e A098294 a(0) = 0 because 2^0 = 1 = (3/2)^0 but 2^(-1) = 1/2 < 1. %e A098294 a(11) = 7 because 2^7 = 128 > 86.497... = (3/2)^11 but 2^6 = 64 < (3/2)^11. %p A098294 seq(ceil(n*log[2](3/2)),n=0..100); # _Robert Israel_, Jul 12 2015 %t A098294 With[{c=Log2[3/2]},Ceiling[c*Range[0,80]]] (* _Harvey P. Dale_, Feb 24 2024 *) %o A098294 (Haskell) %o A098294 import Data.List (elemIndex); import Data.Maybe (fromJust) %o A098294 a098294 0 = 0 %o A098294 a098294 n = fromJust (a001047 n `elemIndex` a227048_row n) + 1 %o A098294 -- _Reinhard Zumkeller_, Jun 30 2013 %o A098294 (Magma) [0] cat [Floor(1 + n * Log(3)/Log(2)) - n: n in [1..70]]; // _Vincenzo Librandi_, Jul 13 2015 %o A098294 (PARI) a(n)=ceil(n*log(3/2)/log(2)) \\ _Charles R Greathouse IV_, Jul 13 2015 %o A098294 (PARI) a(n) = !!n + logint(3^n, 2) - n \\ _Ruud H.G. van Tol_, Nov 21 2023 %Y A098294 Cf. A098295, A020914, A020857. %K A098294 nonn,easy %O A098294 0,3 %A A098294 _Wolfdieter Lang_, Oct 18 2004