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 A071291 #18 Apr 21 2019 09:34:53 %S A071291 0,0,1,0,1,1,1,1,3,1,101,2,1,13,8,5,1,8,5,1,7,4,2,1,1,3,1,2,3,1,1,7,4, %T A071291 2,1,2,1,11,7,8,12,2,1,6,4,30,19,2,129,1,8,13,2,5,1,7,5,32,21,13,1,14, %U A071291 1,8,1,4,2,1,1,1,1,1,1,1,2,3,1,18,2,1,20,3,1,2,1,1,12,1,1,1,2,1,1,2,1 %N A071291 Second term of the continued fraction expansion of (3/2)^n; or 0 if no term is present. %C A071291 What is the average of the reciprocal terms of this sequence? %C A071291 "Pisot and Vijayaraghavan proved that frac((3/2)^n) has infinitely many accumulation points, i.e. infinitely many convergent subsequences with distinct limits. The sequence is believed to be uniformly distributed, but no one has even proved that it is dense in [0,1]." - S. R. Finch %D A071291 S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 192-199. %H A071291 G. C. Greubel, <a href="/A071291/b071291.txt">Table of n, a(n) for n = 1..1000</a> %H A071291 Steven R. Finch, <a href="/FinchPwrs32.html">Powers of 3/2 Modulo One</a> [From Steven Finch, Apr 20 2019] %H A071291 Steven R. Finch, <a href="/FinchWaring.html">Non-Ideal Waring's Problem</a> [From Steven Finch, Apr 20 2019] %H A071291 Jeff Lagarias, <a href="http://www.cecm.sfu.ca/organics/papers/lagarias/index.html">3x+1 Problem</a> %H A071291 C. Pisot, <a href="http://www.numdam.org/item?id=ASNSP_1938_2_7_3-4_205_0">La répartition modulo 1 et les nombres algébriques</a>, Ann. Scuola Norm. Sup. Pisa, 7 (1938), 205-248. %H A071291 T. Vijayaraghavan, <a href="https://doi.org/10.1112/jlms/s1-15.2.159">On the fractional parts of the powers of a number (I)</a>, J. London Math. Soc. 15 (1940) 159-160. %F A071291 a(n) = floor(1/frac(1/frac((3/2)^n))) when frac(1/frac((3/2)^n)) > 0; a(n) = 0 otherwise. %e A071291 a(9) = 3 since floor(1/frac(1/frac(3^9/2^9))) = floor(1/frac(1/.443359375)) = 3. %t A071291 a[n_] := If[FractionalPart[1/FractionalPart[(3/2)^n]] > 0, Floor[1/FractionalPart[1/FractionalPart[(3/2)^n]]], 0]; Table[a[n], {n, 1, 100}] (* _G. C. Greubel_, Apr 18 2017 *) %o A071291 (PARI) a(n) = {cf = contfrac((3/2)^n); if (#cf < 3, return (0), return (cf[3]));} \\_Michel Marcus_, Aug 01 2013 %Y A071291 Cf. A006543, A071353. %K A071291 easy,nonn %O A071291 1,9 %A A071291 _Paul D. Hanna_, Jun 10 2002