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 A006266 M2073 #32 Nov 29 2022 09:42:23 %S A006266 2,14,2786,21624372014,10111847525912679844192131854786, %T A006266 1033930953043290626825587838528711318150300040875029341893199068078185510802565166824630504014 %N A006266 A continued cotangent. %C A006266 The next (6th) term is 280 digits long. - _M. F. Hasler_, Oct 06 2014 %D A006266 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006266 G. C. Greubel, <a href="/A006266/b006266.txt">Table of n, a(n) for n = 0..7</a> %H A006266 Jeffrey 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. %F A006266 From _Artur Jasinski_, Sep 24 2008: (Start) %F A006266 a(n+1) = a(n)^3 + 3*a(n) with a(0) = 2. %F A006266 a(n) = round((1+sqrt(2))^(3^n)). [Corrected by _M. F. Hasler_, Oct 06 2014] (End) %F A006266 From _Peter Bala_, Nov 15 2022: (Start) %F A006266 a(n) = A002203(3^n). %F A006266 a(n) = L(3^n,2), where L(n,x) denotes the n-th Lucas polynomial of A114525. %F A006266 a(n) == 2 (mod 3). %F A006266 a(n+1) == a(n) (mod 3^(n+1)) for n >= 1 (a particular case of the Gauss congruences for the companion Pell numbers). %F A006266 The smallest positive residue of a(n) mod(3^n) = A271222(n). %F A006266 In the ring of 3-adic integers the limit_{n -> oo} a(n) exists and is equal to A271224. Cf. A006267. (End) %p A006266 a := proc(n) option remember; if n = 1 then 14 else a(n-1)^3 + 3*a(n-1) end if; end: seq(a(n), n = 1..5); # _Peter Bala_ Nov 15 2022 %t A006266 Table[Round[(1+Sqrt[2])^(3^n)],{n,0,10}] (* _Artur Jasinski_, Sep 24 2008 *) %t A006266 LucasL[3^Range[0, 7], 2] (* _G. C. Greubel_, Mar 25 2022 *) %o A006266 (PARI) a(n,s=2)=for(i=2,n,s*=(s^2+3));s \\ _M. F. Hasler_, Oct 06 2014 %o A006266 (Magma) [Evaluate(DicksonFirst(3^n, -1), 2): n in [0..7]]; // _G. C. Greubel_, Mar 25 2022 %o A006266 (Sage) [lucas_number2(3^n,2,-1) for n in (0..7)] # _G. C. Greubel_, Mar 25 2022 %Y A006266 Cf. A002203, A006267, A114525, A145451, A145452, A271222, A271224. %K A006266 nonn,easy %O A006266 0,1 %A A006266 _N. J. A. Sloane_ %E A006266 Edited by _M. F. Hasler_, Oct 06 2014 %E A006266 Offset corrected by _G. C. Greubel_, Mar 25 2022