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.

Previous Showing 11-17 of 17 results.

A145187 Continued cotangent recurrence a(n+1)=a(n)^3+3*a(n) with a(1)=13.

Original entry on oeis.org

13, 2236, 11179326964, 1397162674037779847605429310236, 2727350312258670490076364505418491429134385511825631286349491134548728023756939667650354964
Offset: 1

Views

Author

Artur Jasinski, Oct 03 2008

Keywords

Comments

General formula for continued cotangent recurrences of the form a(n+1)=a(n)^3+3*a(n) with a(1)=k is a(n)=floor(((k+sqrt(k^2+4))/2)^(3^(n-1))).
For k=1 see A006267
k=2 see A006266
k=3 see A006268
k=4 see A006267(n+1)
k=5 see A006269
k=6 see A145180
k=7 see A145181
k=8 see A145182
k=9 see A145183
k=10 see A145184
k=11 see A145185
k=12 see A145186
k=13 see A145187
k=14 see A145188
k=15 see A145189

Crossrefs

Programs

  • Mathematica
    a = {}; k = 13; Do[AppendTo[a, k]; k = k^3 + 3 k, {n, 1, 6}]; a
    or
    Table[Floor[((13 + Sqrt[173])/2)^(3^(n - 1))], {n, 1, 5}] (*Artur Jasinski*)

Formula

a(n+1)=a(n)^3+3*a(n) and a(1)=13
a(n)=Floor[((13+Sqrt[13^2+4])/2)^(3^(n-1))]

A145188 Continued cotangent recurrence a(n+1)=a(n)^3+3*a(n) and a(1)=14.

Original entry on oeis.org

14, 2786, 21624372014, 10111847525912679844192131854786, 1033930953043290626825587838528711318150300040875029341893199068078185510802565166824630504014
Offset: 1

Views

Author

Artur Jasinski, Oct 03 2008

Keywords

Comments

General formula for continued cotangent recurrences type:
a(n+1)=a(n)3+3*a(n) and a(1)=k is following:
a(n)=Floor[((k+Sqrt[k^2+4])/2)^(3^(n-1))]
k=1 see A006267
k=2 see A006266
k=3 see A006268
k=4 see A006267(n+1)
k=5 see A006269
k=6 see A145180
k=7 see A145181
k=8 see A145182
k=9 see A145183
k=10 see A145184
k=11 see A145185
k=12 see A145186
k=13 see A145187
k=14 see A145188
k=15 see A145189
Essentially the same as A006266. [From R. J. Mathar, Mar 18 2009]

Crossrefs

Programs

  • Mathematica
    a = {}; k = 14; Do[AppendTo[a, k]; k = k^3 + 3 k, {n, 1, 6}]; a
    or
    Table[Floor[((14 + Sqrt[200])/2)^(3^(n - 1))], {n, 1, 5}] (*Artur Jasinski*)

Formula

a(n+1)=a(n)3+3*a(n) and a(1)=14
a(n)=Floor[((14+Sqrt[14^2+4])/2)^(3^(n-1))]

A271224 Digits of one of the two 3-adic integers sqrt(-2). Here the sequence with first digit 2.

Original entry on oeis.org

2, 1, 0, 2, 2, 0, 2, 1, 2, 2, 2, 0, 1, 0, 2, 1, 2, 1, 1, 2, 0, 0, 2, 1, 1, 1, 0, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 1, 0, 0, 0, 1, 2, 0, 2, 1, 0, 2, 0, 2, 2, 1
Offset: 0

Views

Author

Wolfdieter Lang, Apr 05 2016

Keywords

Comments

This is the scaled first difference sequence of A271222. See the formula.
The digits of the other 3-adic integer sqrt(-2), are given in A271223. See also a comment on A268924 for the two 3-adic numbers sqrt(-2), called there u and -u.
a(n) is the unique solution of the linear congruence 2*A271222(n)*a(n) + A271226(n) == 0 (mod 3), n>=1. Therefore only the values 0, 1, and 2 appear. See the Nagell reference given in A268922, eq. (6) on p. 86, adapted to this case.
a(0) = 2 follows from the formula given below.
For details see the Wolfdieter Lang link under A268992.
The first k digits in the base 3 representation of A002203(3^k) = A006266(k) give the first k terms of the sequence. - Peter Bala, Nov 26 2022

Examples

			a(4) = 2 because 2*59*2 + 43 = 279 == 0 (mod 3).
a(4) = - 43*(2*59) (mod 3) = -1*(2*(-1)) (mod 3) = 2.
A271222(5) = 221  = 2*3^0 + 1*3^1 + 0*3^2 + 2*3^3 + 2*3^4.
		

References

  • Trygve Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 86 and 77-78.

Crossrefs

Cf. A268924, A268992, A271222, A271226, A271223 (companion).

Programs

  • PARI
    a(n) = truncate(-sqrt(-2+O(3^(n+1))))\3^n; \\ Michel Marcus, Apr 09 2016

Formula

a(n) = (b(n+1) - b(n))/3^n, n >= 0, with b(n) = A271222(n), n >= 0.
a(n) = - A271226(n)*2*A271222(n) (mod 3), n >= 1. Solution of the linear congruence given above in a comment. See, e.g., Nagell, Theorem 38 pp. 77-78.
A271222(n+1) = sum(a(k)*3^k, k=0..n), n >= 0.

A002813 a(0) = 4; for n > 0, a(n) = a(n-1)^3 - 3*a(n-1)^2 + 3.

Original entry on oeis.org

4, 19, 5779, 192900153619, 7177905237579946589743592924684179, 369822356418414944143680173221426891716916679027557977938929258031490127514207143830378340325399155219
Offset: 0

Views

Author

Keywords

Comments

An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
The next term, a(7), has 305 digits. - Harvey P. Dale, Jul 19 2011
From Peter Bala, Nov 22 2012: (Start)
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.
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.
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.
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.
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.
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).
(End)

References

  • 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.
  • E. Lucas, Nouveaux théorèmes d'arithmétique supérieure, Comptes Rend., 83 (1876), 1286-1288.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Lucas(2*3^n)+1: n in [0..5]]; // Vincenzo Librandi, Jul 20 2011
  • Mathematica
    NestList[#^3-3#^2+3&,4,6] (* Harvey P. Dale, Jul 19 2011 *)
  • PARI
    a(n)=if(n<1,4*(n==0),a(n-1)^3-3*a(n-1)^2+3)
    
  • PARI
    a(n)=if(n<0,0,n=2*3^n;fibonacci(n+1)+fibonacci(n-1)+1)
    

Formula

a(n) = L(2*3^n)+1 where L=Lucas numbers.
a(n) = L(3^(n+1))/L(3^n). - Benoit Cloitre, Sep 18 2005
a(n) = A001999(n)+1. - R. J. Mathar, Apr 22 2007
From Peter Bala, Nov 22 2012: (Start)
a(n) = ((3 + sqrt(5))/2)^(3^n) + ((3 - sqrt(5))/2)^(3^n) + 1.
(1/5)*sqrt(5) = Product_{n = 0..oo} (1 - 2/a(n)).
A006267(n+1) = Product_{k = 0..n} a(k).
A002814(n+1) = a(n) - 2. (End)

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

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

Original entry on oeis.org

1, 197, 1529074009, 715015595589726925478809323773, 73109958817558064847374518951460268418149511794461927024546978118655493358310911623870212081
Offset: 1

Views

Author

Artur Jasinski, Oct 10 2008

Keywords

Crossrefs

Programs

  • Magma
    [Evaluate(DicksonSecond(3^n -1, -1), 2)/5: n in [1..6]]; // G. C. Greubel, Mar 25 2022
    
  • Mathematica
    Table[Simplify[Expand[(1/(10Sqrt[2]))((1+Sqrt[2])^(3^n) + (1-Sqrt[2])^(3^n))]], {n,5}]
    Fibonacci[3^Range[6], 2]/5 (* G. C. Greubel, Mar 25 2022 *)
  • Sage
    [lucas_number1(3^n,2,-1)/5 for n in (1..6)] # G. C. Greubel, Mar 25 2022

Formula

a(n) = (1/(10*sqrt(2)))*((1 + sqrt(2))^(3^n) - (1 - sqrt(2))^(3^n)).
a(n+1) = 200*a(n)^3 - 3*a(n), a(1) = 1.
a(n) = A000129(3^n)/5 . - R. J. Mathar, Jan 18 2021

Extensions

Offset corrected by R. J. Mathar, Jan 18 2021

A006271 Numerators of a continued fraction for 1 + sqrt(2).

Original entry on oeis.org

2, 5, 197, 7761797, 467613464999866416197, 102249460387306384473056172738577521087843948916391508591105797
Offset: 0

Views

Author

Keywords

Comments

With b(n) = floor((1+sqrt(2))^n) (cf. A080039) the terms appear to be b(2*3^n). - Joerg Arndt, Apr 29 2013
Note that 1 + sqrt(2) = (c + sqrt(c^2+4))/2 and has regular continued fraction [c, c, ...] with c = 2. With b(n) = A006266(n), it can be expanded into an irregular continued fraction f(1) = b(1) and f(n) = (b[n-1]^2+1)/(b[n]-b[n-1]), and numerator(f(n)) = a(n) (cf. Shallit). - Michel Marcus, Apr 29 2013

References

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

Crossrefs

For denominators see A006272. Cf. A002814, A006266, A006273, A006275, A006276.

Programs

  • Maple
    a := proc (n) option remember; if n = 1 then 5 else a(n-1)^3 + 3*a(n-1)^2 - 3 end if; end proc:
    seq(a(n), n = 1 .. 5); # Peter Bala, Jan 19 2022

Formula

From Peter Bala, Jan 18 2022: (Start)
a(n) = (3 + 2*sqrt(2))^3^(n-1) + (3 - 2*sqrt(2))^3^(n-1) - 1 for n >= 1.
a(n) = A006266(n)^2 + 1 for n >= 1.
a(1) = 5 and a(n) = a(n-1)^3 + 3*a(n-1)^2 - 3 for n >= 2.
a(1) = 5 and a(n) = 8*(Product_{k = 1..n-1} a(k))^2 - 3 for n >= 2.
2 - Product_{n = 1..N} (1 + 2/a(n))^2 = 8/(a(N+1) + 3). Therefore
sqrt(2) = (1 + 2/5) * (1 + 2/197) * (1 + 2/7761797) * (1 + 2/ 467613464999866416197) * ... - see Bauer.
The convergence is cubic - see Fine. The first six factors of the product give sqrt(2) correct to more than 500 decimal places. (End)

Extensions

Previous values for a(3) and a(4) were 776 and 1797. They have been merged into 7761797 to reflect the 2nd continued fraction on page 6 of Shallit paper by Michel Marcus, Apr 29 2013
Previous Showing 11-17 of 17 results.