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 A002813 M3561 N1443 #58 Jan 08 2025 09:26:05 %S A002813 4,19,5779,192900153619,7177905237579946589743592924684179, %T A002813 369822356418414944143680173221426891716916679027557977938929258031490127514207143830378340325399155219 %N A002813 a(0) = 4; for n > 0, a(n) = a(n-1)^3 - 3*a(n-1)^2 + 3. %C A002813 An infinite coprime sequence defined by recursion. - _Michael Somos_, Mar 14 2004 %C A002813 The next term, a(7), has 305 digits. - _Harvey P. Dale_, Jul 19 2011 %C A002813 From _Peter Bala_, Nov 22 2012: (Start) %C A002813 The present sequence is the case x = 1 of the following general remarks about the recurrence a(n+1) = a(n)^3 - 3*a(n-1)^2 + 3. Cf. A002814. %C A002813 Define a sequence of polynomials P(n,x) inductively by setting P(0,x) = x^2 + 3 and P(n+1,x) = P(n,x^3 + 3*x) for n >= 0. Then P(n,x) satisfies the cubic recurrence P(n+1,x) = P(n,x)^3 - 3*P(n-1,x)^2 + 3 with the initial condition P(0,x) = x^2 + 3. %C A002813 An explicit formula is P(n,x) = Q(3^(n+1),x)/Q(3^n,x), where Q(n,x) = ((x + sqrt(x^2 + 4))/2)^n + ((x - sqrt(x^2 + 4))/2)^n. %C A002813 Alternatively, P(n,x) = ((x^2 + 2 + sqrt(x^4 + 4*x^2))/2)^(3^n) + ((x^2 + 2 - sqrt(x^4 + 4*x^2))/2)^(3^n) + 1. %C A002813 Iterating the algebraic identity x/sqrt(x^2 + 4) = (1 - 2/(x^2 + 3))*y/sqrt(y^2 + 4), where y = x^3 + 3*x, leads to the product expansion x/sqrt(x^2 + 4) = Product_{n = 0..oo} (1 - 2/P(n,x)). See Escott and also Fine. %C A002813 The sequence A(n,x) := x*Product_{k = 0..n} P(k,x) satisfies the recurrence A(n+1,x) = A(n,x)^3 + 3*A(n,x). These sequences occur in the continued cotangent expansions of Lehmer. Cases currently in the database are A006267 (x = 1), A006266 (x = 2), A006268 (x = 3), A006269 (x = 5) and A145180 through A145189 (x = 6 through x = 15). %C A002813 (End) %D A002813 L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 397. %D A002813 E. Lucas, Nouveaux théorèmes d'arithmétique supérieure, Comptes Rend., 83 (1876), 1286-1288. %D A002813 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002813 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002813 Vincenzo Librandi, <a href="/A002813/b002813.txt">Table of n, a(n) for n = 0..8</a> %H A002813 E. B. Escott, <a href="https://www.jstor.org/stable/2301484">Rapid method for extracting a square root</a>, Amer. Math. Monthly, 44 (1937), 644-646. %H A002813 N. J. Fine, <a href="https://www.jstor.org/stable/2321014">Infinite products for k-th roots</a>, Amer. Math. Monthly Vol. 84, No. 8, Oct. 1977. %H A002813 E. Lucas, <a href="/A001566/a001566.pdf">Nouveaux théorèmes d'arithmétique supérieure</a> (annotated scanned copy) %H A002813 J. Shallit <a href="http://archive.org/details/jresv80Bn2p285">Predictable regular continued cotangent expansions</a>, J. Res. Nat. Bur. Standards Sect. B 80B (1976), no. 2, 285-290. %H A002813 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LehmerCotangentExpansion.html">Lehmer Cotangent Expansion</a> %F A002813 a(n) = L(2*3^n)+1 where L=Lucas numbers. %F A002813 a(n) = L(3^(n+1))/L(3^n). - _Benoit Cloitre_, Sep 18 2005 %F A002813 a(n) = A001999(n)+1. - _R. J. Mathar_, Apr 22 2007 %F A002813 From _Peter Bala_, Nov 22 2012: (Start) %F A002813 a(n) = ((3 + sqrt(5))/2)^(3^n) + ((3 - sqrt(5))/2)^(3^n) + 1. %F A002813 (1/5)*sqrt(5) = Product_{n = 0..oo} (1 - 2/a(n)). %F A002813 A006267(n+1) = Product_{k = 0..n} a(k). %F A002813 A002814(n+1) = a(n) - 2. (End) %t A002813 NestList[#^3-3#^2+3&,4,6] (* _Harvey P. Dale_, Jul 19 2011 *) %o A002813 (PARI) a(n)=if(n<1,4*(n==0),a(n-1)^3-3*a(n-1)^2+3) %o A002813 (PARI) a(n)=if(n<0,0,n=2*3^n;fibonacci(n+1)+fibonacci(n-1)+1) %o A002813 (Magma) [Lucas(2*3^n)+1: n in [0..5]]; // _Vincenzo Librandi_, Jul 20 2011 %Y A002813 Cf. A002814, A006267. %K A002813 nonn,easy,nice %O A002813 0,1 %A A002813 _N. J. A. Sloane_