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-20 of 32 results. Next

A042936 Numerators of continued fraction convergents to sqrt(1000).

Original entry on oeis.org

31, 32, 63, 95, 158, 253, 1676, 3605, 8886, 136895, 282676, 702247, 4496158, 5198405, 9694563, 14892968, 24587531, 39480499, 2472378469, 2511858968, 4984237437, 7496096405, 12480333842, 19976430247, 132338915324, 284654260895, 701647437114, 10809365817605, 22320379072324
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A042937 (denominators).
Analog for sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042934 (m=999).

Programs

  • Mathematica
    Numerator[Convergents[Sqrt[1000], 30]] (* Harvey P. Dale, Oct 29 2013 *)
  • PARI
    A42936=contfracpnqn(c=contfrac(sqrt(1000)), #c)[1,][^-1] \\ Discards possibly incorrect last term. NB: a(n)=A42936[n+1]. Could be extended using: {A42936=concat(A42936, 78960998*A42936[-18..-1]-A42936[-36..-19])}
    \\ But terms with arbitrarily large indices can be computed using:
    A042936(n)={[A42936[n%18+i]|i<-[1, 19]]*([0, -1; 1, 78960998]^(n\18))[,1]} \\ Faster but longer with n=divrem(n,18). (End)

A041010 Numerators of continued fraction convergents to sqrt(8).

Original entry on oeis.org

2, 3, 14, 17, 82, 99, 478, 577, 2786, 3363, 16238, 19601, 94642, 114243, 551614, 665857, 3215042, 3880899, 18738638, 22619537, 109216786, 131836323, 636562078, 768398401, 3710155682, 4478554083, 21624372014, 26102926097, 126036076402, 152139002499
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A040005 (continued fraction), A041011 (denominators), A010466 (decimals).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A005667 (m=10), A041014 (m=11), A041016 (m=12), ..., A042934 (m=999), A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[8],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011*)
    CoefficientList[Series[(2 + 3*x + 2*x^2 - x^3)/(1 - 6*x^2 + x^4), {x, 0, 30}], x]  (* Vincenzo Librandi, Oct 28 2013 *)
    a0[n_] := -((3-2*Sqrt[2])^n*(1+Sqrt[2]))+(-1+Sqrt[2])*(3+2*Sqrt[2])^n // Simplify
    a1[n_] := ((3-2*Sqrt[2])^n+(3+2*Sqrt[2])^n)/2 // Simplify
    Flatten[MapIndexed[{a0[#], a1[#]} &,Range[20]]] (* Gerry Martens, Jul 11 2015 *)
  • PARI
    A041010=contfracpnqn(c=contfrac(sqrt(8)),#c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041010[n+1]! For more terms use:
    A041010(n)={n<#A041010|| A041010=extend(A041010, [-1,0,6,0]~, n\.8); A041010[n+1]}
    extend(A,c,N)={for(n=#A+1,#A=Vec(A,N), A[n]=A[n-#c..n-1]*c);A} \\ (End)

Formula

a(n) = 6*a(n-2) - a(n-4).
a(2n) = a(2n-1) + a(2n-2), a(2n+1) = 4*a(2n) + a(2n-1).
a(2n) = A001333(2n), a(2n+1) = 2*A001333(2n+1).
G.f.: (2+3*x+2*x^2-x^3)/(1-6*x^2+x^4).
a(n) = A001333(n+1)*A000034(n+1). - R. J. Mathar, Jul 08 2009
From Gerry Martens, Jul 11 2015: (Start)
Interspersion of 2 sequences [a0(n),a1(n)] for n>0:
a0(n) = -((3-2*sqrt(2))^n*(1+sqrt(2))) + (-1+sqrt(2))*(3+2*sqrt(2))^n.
a1(n) = ((3-2*sqrt(2))^n + (3+2*sqrt(2))^n)/2. (End)

Extensions

Entry improved by Michael Somos
Initial term 1 removed and b-file, program and formulas adapted by Georg Fischer, Jul 01 2019
Cross-references added by M. F. Hasler, Nov 02 2019

A102341 Areas of 'close-to-equilateral' integer triangles.

Original entry on oeis.org

12, 120, 1848, 25080, 351780, 4890480, 68149872, 949077360, 13219419708, 184120982760, 2564481115560, 35718589344360, 497495864091732, 6929223155685600, 96511629630137568, 1344233586759971040, 18722758603319903340
Offset: 1

Views

Author

Johannes Koelman (Joc_Kay(AT)hotmail.com), Feb 20 2005

Keywords

Comments

A close-to-equilateral integer triangle is defined to be a triangle with integer sides and integer area such that the largest and smallest sides differ in length by unity. The first five close-to-equilateral integer triangles have sides (5, 5, 6), (17, 17, 16), (65, 65, 66), (241, 241, 240) and (901, 901, 902).
After these first five triangles, there are two more (namely (3361,3361,3360,4890480) and (12545,12545,12546,68149872)). - NĂ­colas V. Calsavara, Jul 13 2023
Then, the next four terms are {three sides a<=b<=c and area}: {46816, 46817, 46817, 949077360}, {174725, 174725, 174726, 13219419708}, {652080, 652081, 652081, 184120982760}, {2433601, 2433601, 2433602, 2564481115560}. Also, if we allow degenerate triangles (area 0), the first case would be {1,1,2,0}. We have 12 cases and a weak conjecture is that the total number of the 'close-to-equilateral' triangles is finite. - Zak Seidov, Feb 23 2005
This is an infinite series; two sides are equal in length to the hypotenuse of almost 30-60 triangles and the third side alternates between that length +/- 1. - Dan Sanders (dan(AT)ified.ca), Oct 22 2005
Heron's formula: a triangle with side lengths (x,y,z) has area A = sqrt(s*(s-x)*(s-y)*(s-z)) where s = (x+y+z)/2. For this sequence we assume integer side-lengths x = y = z +/- 1. Then for A to also be an integer, x+y+z must be even, so we can assume z = 2k for some positive integer k. Now s = (x+y+z)/2 = 3k +/- 1 and A = sqrt((3*k +/- 1)*k*k*(k +/- 1)) = k*sqrt(3*k^2 +/- 4*k + 1). To determine when this is an integer, set 3*k^2 +/- 4*k + 1 = d^2. If we multiply both sides by 3, it is easier to complete the square: (3*k +/- 2)^2 - 1 = 3*d^2. Now we are looking for solutions to the Pell equation c^2 - 3*d^2 = 1 with c = 3*k +/- 2, for which there are infinitely many solutions: use the upper principal convergents of the continued fraction expansion of sqrt(3) (A001075/A001353). - Danny Rorabaugh, Oct 16 2015

Examples

			a(2) = 120 because 120 is the area of a triangle with side lengths of 16, 17 and 17.
		

Crossrefs

For the continued fraction expansion of sqrt(3), cf. A002530, A002531, A040001.

Formula

(2/3) [ A007655(n+2) - (-1)^n*A001353(n+1) ] (conjectured). - Ralf Stephan, May 17 2007
Empirical g.f.: 12*x / ((x^2-14*x+1)*(x^2+4*x+1)). - Colin Barker, Apr 10 2013
a(n) = A001353(n+1)*A195499(n) = A001353(n+1)*A120892(n+1) - Danny Rorabaugh, Oct 16 2015

Extensions

More terms from Zak Seidov, Feb 23 2005
More terms from Dan Sanders (dan(AT)ified.ca), Oct 22 2005

A042934 Numerators of continued fraction convergents to sqrt(999).

Original entry on oeis.org

31, 32, 63, 95, 158, 885, 5468, 6353, 37233, 80819, 441328, 522147, 3574210, 18393197, 21967407, 40360604, 62328011, 102688615, 6429022141, 6531710756, 12960732897, 19492443653, 32453176550
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A042935 (denominators).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042936 (m=1000).

Programs

  • Mathematica
    Numerator[Convergents[Sqrt[999], 30]] (* Vincenzo Librandi, Dec 10 2013 *)
  • PARI
    A42934=contfracpnqn(c=contfrac(sqrt(999)), #c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n) = A42934[n+1]! For more terms, use:
    A042934(n)={n<#A42934 || A42934_upto(n+10); A42934[n+1]}
    {A42934_upto(N,A=Vec(A42934,N))=for(n=#A42934+1,N, A[n]=205377230*A[n-18]-A[n-36]); A42934=A} \\ M. F. Hasler, Nov 01 2019

Formula

a(n) = 205377230*a(n-18) - a(n-36). - Wesley Ivan Hurt, May 28 2021

A143643 Numerators of the lower principal convergents and the lower intermediate convergents to 3^(1/2).

Original entry on oeis.org

1, 3, 5, 12, 19, 45, 71, 168, 265, 627, 989, 2340, 3691, 8733, 13775, 32592, 51409, 121635, 191861, 453948, 716035, 1694157, 2672279, 6322680, 9973081, 23596563, 37220045, 88063572, 138907099, 328657725, 518408351, 1226567328, 1934726305, 4577611587, 7220496869, 17083879020, 26947261171, 63757904493, 100568547815
Offset: 1

Views

Author

Clark Kimberling, Aug 27 2008

Keywords

Comments

The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; with essentially, numerators being this sequence and denominators being A005246.
sqrt(floor(a(n)^2/3)+1) = A005246(n+1). Also see A082630. - Richard R. Forberg, Nov 14 2013
a(n) = U_n(sqrt(6),1) for n odd and a(n) = 3*U_n(sqrt(6),1) for n even, where U_n(sqrt(R),Q) denotes the Lehmer sequence with parameters R and Q. This sequence is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all positive integers n and m. Consequently, this sequence is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Sep 03 2019

Examples

			From _Peter Bala_, Sep 03 2019: (Start)
If p(n)/q(n) denotes the n-th convergent to the simple continued fraction alpha = [c(0); c(1), c(2), ...] then a lower semiconvergent is a rational number of the form ( p(2*n) + m*p(2*n+1) )/( q(2*n) + m*q(2*n+1) ) where 0 <= m <= c(2*n+2). The lower semiconvergents include the even-indexed convergents p(2*n)/q(2*n) and give an increasing sequence of approximations to alpha from below.
In this case the simple continued fraction expansion sqrt(3) = [1; 1, 2, 1, 2, ...] produces the sequence of convergents (p(n)/q(n))n>=0 = [1/1, 2/1, 5/3, 7/4, 19/11, 26,15, 71/41, ...].
Thus the increasing sequence of lower semiconvergents begins 1/1, (1 + 2)/(1 + 1) = 3/2, (1 + 2*2)/(1 + 2*1) = 5/3, (5 + 7)/(3 + 4) = 12/7, (5 + 2*7)/(3 + 2*4) = 19/11, ... with numerators 1, 3, 5, 12, 19, .... (End)
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Clark Kimberling, "Best lower and upper approximates to irrational numbers," Elemente der Mathematik, 52 (1997) 122-126.

Crossrefs

Formula

a(n) = 4*a(n-2)-a(n-4). G.f.: x*(1+3*x+x^2)/(1-4*x^2+x^4). - Colin Barker, Apr 28 2012

A144535 Numerators of continued fraction convergents to sqrt(3)/2.

Original entry on oeis.org

0, 1, 6, 13, 84, 181, 1170, 2521, 16296, 35113, 226974, 489061, 3161340, 6811741, 44031786, 94875313, 613283664, 1321442641, 8541939510, 18405321661, 118973869476, 256353060613, 1657092233154, 3570537526921, 23080317394680, 49731172316281, 321467351292366
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2008

Keywords

Examples

			0, 1, 6/7, 13/15, 84/97, 181/209, 1170/1351, 2521/2911, 16296/18817, 35113/40545, ...
		

Crossrefs

Bisections give A001570, A011945.

Programs

  • Magma
    I:=[0, 1, 6, 13]; [n le 4 select I[n] else 14*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 10 2013
    
  • Maple
    with(numtheory); Digits:=200: cf:=convert(evalf(sqrt(3)/2,confrac); [seq(nthconver(cf,i), i=0..100)];
  • Mathematica
    CoefficientList[Series[x (1 + 6 x - x^2)/((1 - 4 x + x^2) (1 + 4 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 10 2013 *)
    Numerator[Convergents[Sqrt[3]/2,30]] (* or *) LinearRecurrence[{0,14,0,-1},{0,1,6,13},30] (* Harvey P. Dale, Feb 10 2014 *)
  • PARI
    Vec(x*(1+6*x-x^2)/((1-4*x+x^2)*(1+4*x+x^2)) + O(x^30)) \\ Colin Barker, Mar 27 2016

Formula

From Colin Barker, Apr 14 2012: (Start)
a(n) = 14*a(n-2) - a(n-4).
G.f.: x*(1 + 6*x - x^2)/((1 - 4*x + x^2)*(1 + 4*x + x^2)). (End)
a(n) = ((-(-2-sqrt(3))^n*(-3+sqrt(3)) + (2-sqrt(3))^n*(-3+sqrt(3)) - (3+sqrt(3))*((-2+sqrt(3))^n - (2+sqrt(3))^n)))/(8*sqrt(3)). - Colin Barker, Mar 27 2016
a(2*n) = 6*a(2*n-1) + a(2*n-2). a(2*n+1) = A003154(A101265(n+1)). - John Elias, Dec 10 2021

A144536 Denominators of continued fraction convergents to sqrt(3)/2.

Original entry on oeis.org

1, 1, 7, 15, 97, 209, 1351, 2911, 18817, 40545, 262087, 564719, 3650401, 7865521, 50843527, 109552575, 708158977, 1525870529, 9863382151, 21252634831, 137379191137, 296011017105, 1913445293767, 4122901604639, 26650854921601, 57424611447841, 371198523608647
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2008

Keywords

Examples

			0, 1, 6/7, 13/15, 84/97, 181/209, 1170/1351, 2521/2911, 16296/18817, 35113/40545, ...
		

Crossrefs

Bisections give A011943, A028230.

Programs

  • Maple
    with(numtheory); Digits:=200: cf:=convert(evalf(sqrt(3)/2,confrac); [seq(nthconver(cf,i), i=0..100)];
  • Mathematica
    Denominator[Convergents [Sqrt[3]/2, 30]] (* Vincenzo Librandi, Feb 01 2014 *)
    LinearRecurrence[{0,14,0,-1},{1,1,7,15},30] (* Harvey P. Dale, Sep 15 2017 *)

Formula

G.f.: (1 + x - 7*x^2 + x^3)/(1 - 14*x^2 + x^4). - Colin Barker, Jan 01 2012
a(n) = 14*a(n-2) - a(n-4). - Sergei N. Gladkovskii, Jun 07 2015
a(n) = ((3+sqrt(3))*((-2+sqrt(3))^n + (2+sqrt(3))^n) - (-3+sqrt(3))*((-2-sqrt(3))^n + (2-sqrt(3))^n))/12. - Vaclav Kotesovec, Jun 08 2015
From John Elias, Dec 02 2021: (Start)
a(2*n) = 6*A001353(n)^2 + 1. See illustration in links.
a(2*n+1) = 2*a(2*n) + a(2*n-1). (End)

A265294 Decimal expansion of Sum_{n>=1} (x - c(2n-1)), where c = convergents to (x = sqrt(3)).

Original entry on oeis.org

8, 0, 2, 5, 8, 3, 0, 9, 0, 8, 0, 3, 5, 1, 4, 8, 3, 4, 3, 7, 7, 8, 7, 4, 1, 8, 1, 2, 6, 3, 0, 4, 2, 4, 9, 6, 0, 5, 8, 6, 0, 4, 7, 7, 6, 8, 9, 5, 1, 3, 2, 7, 7, 7, 0, 1, 7, 7, 4, 1, 8, 5, 1, 4, 8, 4, 1, 4, 0, 6, 0, 8, 4, 4, 8, 7, 0, 0, 3, 0, 2, 2, 1, 7, 9, 4
Offset: 0

Views

Author

Clark Kimberling, Dec 07 2015

Keywords

Examples

			sum = 0.8025830908035148343778741812630...
		

Crossrefs

Programs

  • Maple
    x := sqrt(3) - 2:
    evalf(2*sqrt(3)*add( x^(n*(n+1)/2)/(x^n - 1), n = 1..18), 100); # Peter Bala, Aug 24 2022
  • Mathematica
    x = Sqrt[3]; z = 600; c = Convergents[x, z];
    s1 = Sum[x - c[[2 k - 1]], {k, 1, z/2}]; N[s1, 200]
    s2 = Sum[c[[2 k]] - x, {k, 1, z/2}]; N[s2, 200]
    N[s1 + s2, 200]
    RealDigits[s1, 10, 120][[1]]  (* A265294 *)
    RealDigits[s2, 10, 120][[1]]  (* A265295 *)
    RealDigits[s1 + s2, 10, 120][[1]](* A265296 *)

Formula

From Peter Bala, Aug 24 2022: (Start)
Equals 2*sqrt(3)*Sum_{n >= 1} 1/( 1 + (2+sqrt(3))^(2*n-1) ).
A more rapidly converging series for the constant is 2*sqrt(3)*Sum_{n >= 1} x^(n*(n+1)/2)/(x^n - 1), where x = sqrt(3) - 2. See A001227. (End)

A265295 Decimal expansion of Sum_{n >= 1} (c(2*n) - x), where c(n) = the n-th convergent to x = sqrt(3).

Original entry on oeis.org

2, 8, 7, 2, 8, 0, 0, 8, 0, 0, 8, 3, 4, 8, 8, 3, 9, 3, 5, 1, 1, 4, 5, 1, 5, 3, 9, 8, 7, 6, 6, 8, 3, 3, 1, 6, 8, 2, 3, 9, 0, 9, 4, 2, 0, 8, 6, 4, 5, 6, 7, 1, 8, 7, 9, 3, 8, 7, 1, 6, 8, 2, 6, 8, 1, 3, 8, 8, 3, 8, 6, 4, 1, 0, 7, 1, 6, 8, 0, 0, 6, 4, 0, 8, 2, 6
Offset: 0

Views

Author

Clark Kimberling, Dec 07 2015

Keywords

Examples

			sum = 0.28728008008348839351145153987668331682390...
		

Crossrefs

Programs

  • Maple
    x := 7 - 4*sqrt(3):
    evalf(2*sqrt(3)*add( x^(n^2)*(1 + x^n)/(1 - x^n), n = 1..10), 100); # Peter Bala, Aug 24 2022
  • Mathematica
    x = Sqrt[3]; z = 600; c = Convergents[x, z];
    s1 = Sum[x - c[[2 k - 1]], {k, 1, z/2}]; N[s1, 200]
    s2 = Sum[c[[2 k]] - x, {k, 1, z/2}]; N[s2, 200]
    N[s1 + s2, 200]
    RealDigits[s1, 10, 120][[1]]  (* A265294 *)
    RealDigits[s2, 10, 120][[1]]  (* A265295 *)
    RealDigits[s1 + s2, 10, 120][[1]](* A265296 *)

Formula

Equals 2*sqrt(3)*Sum_{n >= 1} x^(n^2)*(1 + x^n)/(1 - x^n), where x = 7 - 4*sqrt(3). - Peter Bala, Aug 24 2022

A265296 Decimal expansion of Sum_{n >= 1} (c(2*n) - c(2*n-1)), where c(n) = the n-th convergent to x = sqrt(3).

Original entry on oeis.org

1, 0, 8, 9, 8, 6, 3, 1, 7, 0, 8, 8, 7, 0, 0, 3, 2, 2, 7, 8, 8, 9, 3, 2, 5, 7, 2, 1, 1, 3, 9, 7, 2, 5, 8, 1, 2, 8, 8, 2, 5, 1, 4, 1, 9, 7, 7, 5, 9, 6, 9, 9, 9, 6, 4, 9, 5, 6, 4, 5, 8, 6, 7, 8, 2, 9, 8, 0, 2, 4, 4, 7, 2, 5, 5, 5, 8, 6, 8, 3, 0, 8, 6, 2, 6, 2
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2015

Keywords

Examples

			sum = 1.0898631708870032278893257211397258128825141977596999...
		

Crossrefs

Programs

  • Maple
    x := 2 - sqrt(3):
    evalf(2*sqrt(3)*add(x^(n^2)*(1 + x^(2*n))/(1 - x^(2*n)), n = 1..13), 100); # Peter Bala, Aug 24 2022
  • Mathematica
    x = Sqrt[3]; z = 600; c = Convergents[x, z];
    s1 = Sum[x - c[[2 k - 1]], {k, 1, z/2}]; N[s1, 200]
    s2 = Sum[c[[2 k]] - x, {k, 1, z/2}]; N[s2, 200]
    N[s1 + s2, 200]
    RealDigits[s1, 10, 120][[1]]  (* A265294 *)
    RealDigits[s2, 10, 120][[1]]  (* A265295 *)
    RealDigits[s1 + s2, 10, 120][[1]](* A265296 *)

Formula

Equals 2*sqrt(3)*Sum_{n >= 1} x^(n^2)*(1 + x^(2*n))/(1 - x^(2*n)), where x = 2 - sqrt(3). - Peter Bala, Aug 24 2022
Previous Showing 11-20 of 32 results. Next