cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A006266 A continued cotangent.

Original entry on oeis.org

2, 14, 2786, 21624372014, 10111847525912679844192131854786, 1033930953043290626825587838528711318150300040875029341893199068078185510802565166824630504014
Offset: 0

Views

Author

Keywords

Comments

The next (6th) term is 280 digits long. - M. F. Hasler, Oct 06 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Evaluate(DicksonFirst(3^n, -1), 2): n in [0..7]]; // G. C. Greubel, Mar 25 2022
    
  • Maple
    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
  • Mathematica
    Table[Round[(1+Sqrt[2])^(3^n)],{n,0,10}] (* Artur Jasinski, Sep 24 2008 *)
    LucasL[3^Range[0, 7], 2] (* G. C. Greubel, Mar 25 2022 *)
  • PARI
    a(n,s=2)=for(i=2,n,s*=(s^2+3));s \\ M. F. Hasler, Oct 06 2014
    
  • Sage
    [lucas_number2(3^n,2,-1) for n in (0..7)] # G. C. Greubel, Mar 25 2022

Formula

From Artur Jasinski, Sep 24 2008: (Start)
a(n+1) = a(n)^3 + 3*a(n) with a(0) = 2.
a(n) = round((1+sqrt(2))^(3^n)). [Corrected by M. F. Hasler, Oct 06 2014] (End)
From Peter Bala, Nov 15 2022: (Start)
a(n) = A002203(3^n).
a(n) = L(3^n,2), where L(n,x) denotes the n-th Lucas polynomial of A114525.
a(n) == 2 (mod 3).
a(n+1) == a(n) (mod 3^(n+1)) for n >= 1 (a particular case of the Gauss congruences for the companion Pell numbers).
The smallest positive residue of a(n) mod(3^n) = A271222(n).
In the ring of 3-adic integers the limit_{n -> oo} a(n) exists and is equal to A271224. Cf. A006267. (End)

Extensions

Edited by M. F. Hasler, Oct 06 2014
Offset corrected by G. C. Greubel, Mar 25 2022

A145451 a(n) = (1/2) * ((1 + sqrt(2))^(3^n) + (1 - sqrt(2))^(3^n)).

Original entry on oeis.org

1, 7, 1393, 10812186007, 5055923762956339922096065927393, 516965476521645313412793919264355659075150020437514670946599534039092755401282583412315252007
Offset: 0

Views

Author

Artur Jasinski, Oct 10 2008

Keywords

Comments

Empirical observation: a(n) is the numerator of the lowest-terms fraction representing the n-th approximation of sqrt(2) that is obtained via Halley's method when finding the root of x^2 - 2 = 0, starting with x=1 for n=0. Halley's method gives the next value of x as x * (x^2 + 6) / (3*x^2 + 2). - Lee A. Newberg, Apr 27 2018
The next term has 279 digits. - Harvey P. Dale, May 31 2019

Crossrefs

Programs

  • Magma
    [Evaluate(DicksonFirst(3^n, -1), 2)/2: n in [0..7]]; // G. C. Greubel, Sep 27 2018; Mar 25 2022
    
  • Mathematica
    Table[Simplify[Expand[(1/2) ((1 + Sqrt[2])^(3^n) + (1 - Sqrt[2])^(3^n))]], {n, 0, 5}]
    a = {}; k = 1; Do[AppendTo[a, k]; k = 4 k^3 + 3 k, {n, 1, 6}]; a
    NestList[4#^3+3#&,1,5] (* Harvey P. Dale, May 31 2019 *)
    LucasL[3^Range[0, 7], 2]/2 (* G. C. Greubel, Mar 25 2022 *)
  • PARI
    A002203(n) = my(w=quadgen(8)); (1+w)^n + (1-w)^n;
    vector(7, n, n--; A002203(3^n)/2 ) \\ G. C. Greubel, Sep 27 2018; Mar 25 2022
    
  • Sage
    [lucas_number2(3^n,2,-1)/2 for n in (0..7)] # G. C. Greubel, Mar 25 2022

Formula

a(n) = (1/2) * ((1 + sqrt(2))^(3^n) + (1 - sqrt(2))^(3^n)).
a(n+1) = 4*a(n)^3 + 3*a(n), a(0)=1.
a(n) = A006266(n)/2.
a(n) = A001333(3^n). - R. J. Mathar, Jan 18 2021
Showing 1-2 of 2 results.