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-5 of 5 results.

A228931 Optimal ascending continued fraction expansion of sqrt(2)-1.

Original entry on oeis.org

2, -6, 34, 1154, 1331714, 1773462177794, 3145168096065837266706434, 9892082352510403757550172975146702122837936996354
Offset: 1

Views

Author

Giovanni Artico, Sep 09 2013

Keywords

Comments

See A228929 for the definition of "optimal ascending continued fraction".
Conjecture: The terms from a(3) are all positive and can be generated by the recurrence relation a(k+1) = a(k)^2 - 2.
This relation was studied by Lucas with reference to Engel expansion.
This recurrence is not peculiar of sqrt(2) but is present in the expansion of the square root of many other numbers, starting from some term onward, but not for all numbers. Here is a list of the numbers in range 1..200 having the recurrence: 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 45, 47, 48, 50, 51, 52, 54, 55, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 70, 71, 72, 74, 75, 77, 78, 79, 80, 82, 83, 84, 87, 88, 90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107, 110, 111, 112, 114, 117, 119, 120, 122, 123, 124, 126, 128, 130, 132, 133, 135, 136, 138, 140, 141, 142, 143, 145, 146, 147, 148, 150, 152, 155, 156, 158, 162, 164, 165, 167, 168, 170, 171, 174, 175, 178, 180, 182, 183, 185, 187, 188, 189, 192, 194, 195, 197, 198, 200
Essentially the same as A003423. - R. J. Mathar, Sep 21 2013

Examples

			sqrt(2)=1+1/2*(1-1/6*(1+1/34*(1+1/1154*(1+1/1331714*(1+1/1773462177794*(1+.....))))))
		

Crossrefs

Programs

  • Maple
    ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc
    # List the first 8 terms of the expansion of sqrt(2)-1
    ArticoExp(sqrt(2),8)
  • Mathematica
    Flatten[{2, RecurrenceTable[{a[n] == a[n-1]^2 - 2, a[2] == -6}, a, {n, 2, 10}]}] (* Vaclav Kotesovec, Sep 20 2013 *)

Formula

a(n) = a(n-1)^2 - 2, for n > 2.
For n>2, a(n) = (sqrt(2)+1)^(2^(n-1)) + (sqrt(2)-1)^(2^(n-1)). - Vaclav Kotesovec, Sep 20 2013

Extensions

Added a pdf file with a proof of the conjecture by Giovanni Artico

A228932 Optimal ascending continued fraction expansion of sqrt(43) - 6.

Original entry on oeis.org

2, 9, 30, 60, 122, -878, 11429, 35241, -177141, 709582, -3123032, -1157723745, 3237738813, -16178936725, 33395053634, -71863018424, -153349368674, -386763022623, -8021033029400, 16314606875900, 52522689388692
Offset: 1

Views

Author

Giovanni Artico, Sep 10 2013

Keywords

Comments

See A228929 for the definition of "optimal ascending continued fraction".
In A228931 it is shown that many numbers of the type sqrt(x) seem to present in their expansion a recurrence relation a(n) = a(n-1)^2 - 2 between the terms, starting from some point onward; 43 is the first natural number whose terms don't respect this relation.
The numbers in range 1 .. 200 that exhibit this behavior are 43, 44, 46, 53, 58, 61, 67, 73, 76, 85, 86, 89, 91, 94, 97, 103, 106, 108, 109, 113, 115, 116, 118, 125, 127, 129, 131, 134, 137, 139, 149, 151, 153, 154, 157, 159, 160, 161, 163, 166, 172, 173, 176, 177, 179, 181, 184, 186, 190, 191, 193, 199.
Nevertheless, the expansions of 3*sqrt(43), 9*sqrt(43), and sqrt(43)/5 satisfy the recurrence relation.

Examples

			sqrt(43) = 6 + 1/2*(1 + 1/9*(1 + 1/30*(1 + 1/60*(1 + 1/122*(1 - 1/878*(1 + ...)))))).
		

References

Crossrefs

Programs

  • Maple
    ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc
    # List the first 8 terms of the expansion of sqrt(43)-6
    ArticoExp(sqrt(43),20)
  • Mathematica
    ArticoExp[x_, n_] := Round[1/#] & /@ NestList[Round[1/Abs[#]]*Abs[#] - 1 &, FractionalPart[x], n]; Block[{$MaxExtraPrecision = 50000},
    ArticoExp[Sqrt[43] - 6, 20]] (* G. C. Greubel, Dec 26 2016 *)

A228930 Optimal ascending continued fraction expansion of e - 2.

Original entry on oeis.org

1, -4, 8, 67, 266, 9757, 47748, -97258, -251115, 671488, -4724169, -28356343, 125269419, -498668029, -5426804695, 15313259790, -40462770156, 105160602326, -4412226092528, -350847041434052, -54342998565206181
Offset: 1

Views

Author

Giovanni Artico, Sep 09 2013

Keywords

Comments

See A228929 for explanation.

Examples

			e = 2 + 1*(1 - 1/4*(1 + 1/8*(1 + 1/67*(1 + 1/266*(1 + 1/9757*(1 + ...)))))).
		

Crossrefs

Cf. A228929.

Programs

  • Maple
    ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc
    # List the first 20 terms of the expansion of exp(1)-2
    ArticoExp(exp(1),20)
  • Mathematica
    ArticoExp[x_, n_] := Round[1/#] & /@ NestList[Round[1/Abs[#]]*Abs[#] - 1 &, FractionalPart[x], n]; Block[{$MaxExtraPrecision = 50000}, ArticoExp[Exp[1] - 2, 20]] (* G. C. Greubel, Dec 26 2016 *)

Formula

Given a positive real number x, let z(0) = x - floor(x) and z(k+1) = abs(z(k))*round(1/abs(z(k))) - 1; then a(n) = sign(z(n))*round(1/abs(z(n))) for n>0.

A228933 Optimal ascending continued fraction expansion of phi-1=1/phi=(sqrt(5)-1)/2 .

Original entry on oeis.org

2, 4, -18, 322, 103682, 10749957122, 115561578124838522882, 13354478338703157414450712387359637585922, 178342091698891843163466683840822101223162205277179656650156983624835803932590082
Offset: 1

Views

Author

Giovanni Artico, Sep 10 2013

Keywords

Comments

See A228929 for the definition of "optimal ascending continued fraction".
Conjecture: The golden ratio (phi) expansion exhibits from the fourth term the recurrence relation a(n) = a(n-1)^2 - 2 described in A228931.

Examples

			phi = 1+1/2*(1+1/4*(1-1/18*(1+1/322*(1+1/103682*(1+1/10749957122*(1+...))))))
		

Crossrefs

Programs

  • Maple
    ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc
    # List the first 8 terms of the expansion of 1/phi
    ArticoExp((sqrt(5)-1)/2,8)
  • Mathematica
    Flatten[{2, 4, RecurrenceTable[{a[n] == a[n-1]^2 - 2, a[3] == -18}, a, {n, 3, 10}]}] (* Vaclav Kotesovec, Sep 20 2013 *)

Formula

a(n) = a(n-1)^2 - 2 for n>3.
For n>3, a(n) = (sqrt(5)+2)^(2^(n-2)) + (sqrt(5)-2)^(2^(n-2)). - Vaclav Kotesovec, Sep 20 2013
a(n) = 2*A081459(n-1) for n>3. - Amiram Eldar, Apr 07 2023

A228934 Optimal ascending continued fraction expansion of sqrt(44) - 6.

Original entry on oeis.org

2, 4, 15, -99, -199, -800, -79201, -316808, -12545596801, -50182387208, -314783998186522867201, -1259135992746091468808, -198177931028585663493396958369763763148801, -792711724114342653973587833479055052595208
Offset: 1

Views

Author

Giovanni Artico, Sep 11 2013

Keywords

Comments

See A228929 for the definition of "optimal ascending continued fraction".
This is the first number whose expansion exhibits (in the first 20 terms) a different recurrence relation from that described in A228931.
Conjecture: The terms of the expansion of sqrt(x) are all negative starting from a(4) and satisfy these recurrence relations for n>=3: a(2n) = 4*a(2n-1) - 4 and a(2n+1) = -2*a(2n-1)^2 + 1.
Numbers (in the range 1..1000) that exhibit this recurrence starting from some n are 44, 125, 154, 160, 176, 207, 208, 280, 352, 384, 459, 468, 500, 608, 616, 640, 665, 686, 704, 768, 800, 832, 864, 874, 875, 924.

Examples

			sqrt(44) = 6 + 1/2*(1 + 1/4*(1 + 1/15*(1 - 1/99*(1 - 1/199*(1 - 1/800*(1 - 1/79201*(1 - 1/316808*(1 - 1/12545596801*(1 - ...))))))))).
		

Crossrefs

Programs

  • Maple
    ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc
    # List the first 20 terms of the expansion of sqrt(44)-6
    ArticoExp(sqrt(44),20)
  • Mathematica
    ArticoExp[x_, n_] := Round[1/#] & /@ NestList[Round[1/Abs[#]]*Abs[#] - 1 &, FractionalPart[x], n]; Block[{$MaxExtraPrecision = 50000}, ArticoExp[Sqrt[44] - 6, 20]] (* G. C. Greubel, Dec 26 2016 *)

Formula

a(2n) = 4*a(2n-1) - 4 and a(2n+1) = -2*a(2n-1)^2 + 1 for n >= 3.

Extensions

Minor typos corrected by Giovanni Artico, Sep 24 2013
Showing 1-5 of 5 results.