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 A005828 M3642 #41 May 17 2023 08:42:10 %S A005828 4,31,1921,7380481,108942999582721,23737154316161495960243527681, %T A005828 1126904990058528673830897031906808442930637286502826475521 %N A005828 a(n) = 2*a(n-1)^2 - 1, a(0) = 4, a(1) = 31. %C A005828 An infinite coprime sequence defined by recursion. - _Michael Somos_, Mar 14 2004 %C A005828 The next term has 115 digits. - _Harvey P. Dale_, May 25 2018 %D A005828 Jeffrey Shallit, personal communication. %D A005828 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A005828 G. C. Greubel, <a href="/A005828/b005828.txt">Table of n, a(n) for n = 0..10</a> %H A005828 Anonymous, <a href="http://www-maths.swan.ac.uk/pgrads/bb/project/node28.html">Fermat's rule for 3-fold perfect numbers</a> [Broken link] %F A005828 a(n) = A001091(2^n). %F A005828 From _Peter Bala_, Nov 11 2012, (Start) %F A005828 a(n) = (1/2)*((4 + sqrt(15))^(2^n) + (4 - sqrt(15))^(2^n)). %F A005828 2*sqrt(15)/9 = Product_{n>=0} (1 - 1/(2*a(n))). %F A005828 sqrt(5/3) = Product_{n>=0} (1 + 1/a(n)). %F A005828 See A002812 for general properties of the recurrence a(n+1) = 2*a(n)^2 - 1. %F A005828 (End) %F A005828 a(n) = T(2^n,4), where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. - _Peter Bala_, Feb 01 2017 %F A005828 a(n) = cos(2^n*arccos(4)). - _Peter Luschny_, Oct 12 2022 %t A005828 NestList[2#^2-1&,4,10] (* _Harvey P. Dale_, May 25 2018 *) %o A005828 (PARI) a(n)=if(n<1,4*(n==0),2*a(n-1)^2-1) %o A005828 (PARI) a(n)=if(n<0,0,subst(poltchebi(2^n),x,4)) %o A005828 (Magma) [n le 2 select 2^(3*n-1)-n+1 else 2*Self(n-1)^2 - 1: n in [1..10]]; // _G. C. Greubel_, May 17 2023 %o A005828 (SageMath) [chebyshev_T(2^n, 4) for n in range(11)] # _G. C. Greubel_, May 17 2023 %Y A005828 Cf. A001091, A001601, A002812, A084764 (essentially the same). %K A005828 nonn,easy %O A005828 0,1 %A A005828 _Jeffrey Shallit_