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

A002530 a(n) = 4*a(n-2) - a(n-4) for n > 1, a(n) = n for n = 0, 1.

Original entry on oeis.org

0, 1, 1, 3, 4, 11, 15, 41, 56, 153, 209, 571, 780, 2131, 2911, 7953, 10864, 29681, 40545, 110771, 151316, 413403, 564719, 1542841, 2107560, 5757961, 7865521, 21489003, 29354524, 80198051, 109552575, 299303201, 408855776, 1117014753, 1525870529, 4168755811
Offset: 0

Views

Author

Keywords

Comments

Denominators of continued fraction convergents to sqrt(3), for n >= 1.
Also denominators of continued fraction convergents to sqrt(3) - 1. See A048788 for numerators. - N. J. A. Sloane, Dec 17 2007. Convergents are 1, 2/3, 3/4, 8/11, 11/15, 30/41, 41/56, 112/153, ...
Consider the mapping f(a/b) = (a + 3*b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 2/1, 5/3, 7/4, 19/11, ... converging to 3^(1/2). Sequence contains the denominators. The same mapping for N, i.e., f(a/b) = (a + Nb)/(a + b) gives fractions converging to N^(1/2). - Amarnath Murthy, Mar 22 2003
Sqrt(3) = 2/2 + 2/3 + 2/(3*11) + 2/(11*41) + 2/(41*153) + 2/(153*571), ...; the sum of the first 6 terms of this series = 1.7320490367..., while sqrt(3) = 1.7320508075... - Gary W. Adamson, Dec 15 2007
From Clark Kimberling, Aug 27 2008: (Start)
Related convergents (numerator/denominator):
lower principal convergents: A001834/A001835
upper principal convergents: A001075/A001353
intermediate convergents: A005320/A001075
principal and intermediate convergents: A143642/A140827
lower principal and intermediate convergents: A143643/A005246. (End)
Row sums of triangle A152063 = (1, 3, 4, 11, ...). - Gary W. Adamson, Nov 26 2008
From Alois P. Heinz, Apr 13 2011: (Start)
Also number of domino tilings of the 3 X (n-1) rectangle with upper left corner removed iff n is even. For n=4 the 4 domino tilings of the 3 X 3 rectangle with upper left corner removed are:
. ._. . ._. . ._. . ._.
.|__| .|__| .| | | .|___|
| |_| | | | | | ||| |_| |
||__| |||_| ||__| |_|_| (End)
This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 2 and Q = -1. It is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all natural numbers n and m. - Peter Bala, Apr 18 2014
2^(-floor(n/2))*(1 + sqrt(3))^n = A002531(n) + a(n)*sqrt(3); integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 11 2018
Let T(n) = 2^(n mod 2), U(n) = a(n), V(n) = A002531(n), x(n) = V(n)/U(n). Then T(n*m) * U(n+m) = U(n)*V(m) + U(m)*V(n), T(n*m) * V(n+m) = 3*U(n)*U(m) + V(m)*V(n), x(n+m) = (3 + x(n)*x(m))/(x(n) + x(m)). - Michael Somos, Nov 29 2022

Examples

			Convergents to sqrt(3) are: 1, 2, 5/3, 7/4, 19/11, 26/15, 71/41, 97/56, 265/153, 362/209, 989/571, 1351/780, 3691/2131, ... = A002531/A002530 for n >= 1.
1 + 1/(1 + 1/(2 + 1/(1 + 1/2))) = 19/11 so a(5) = 11.
G.f. = x + x^2 + 3*x^3 + 4*x^4 + 11*x^5 + 15*x^6 + 41*x^7 + ... - _Michael Somos_, Mar 18 2022
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Russell Lyons, A bird's-eye view of uniform spanning trees and forests, in Microsurveys in Discrete Probability, AMS, 1998.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 181.
  • Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
  • 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).
  • A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.

Crossrefs

Cf. A002531 (numerators of convergents to sqrt(3)), A048788, A003297.
Bisections: A001353 and A001835.
Cf. A152063.
Analog for sqrt(m): A000129 (m=2), A001076 (m=5), A041007 (m=6), A041009 (m=7), A041011 (m=8), A005668 (m=10), A041015 (m=11), A041017 (m=12), ..., A042935 (m=999), A042937 (m=1000).

Programs

  • Magma
    I:=[0,1,1,3]; [n le 4 select I[n] else 4*Self(n-2) - Self(n-4): n in [1..50]]; // G. C. Greubel, Feb 25 2019
    
  • Maple
    a := proc(n) option remember; if n=0 then 0 elif n=1 then 1 elif n=2 then 1 elif n=3 then 3 else 4*a(n-2)-a(n-4) fi end; [ seq(a(i),i=0..50) ];
    A002530:=-(-1-z+z**2)/(1-4*z**2+z**4); # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Join[{0},Table[Denominator[FromContinuedFraction[ContinuedFraction[Sqrt[3],n]]], {n,1,50}]] (* Stefan Steinerberger, Apr 01 2006 *)
    Join[{0},Denominator[Convergents[Sqrt[3],50]]] (* or *) LinearRecurrence[ {0,4,0,-1},{0,1,1,3},50] (* Harvey P. Dale, Jan 29 2013 *)
    a[ n_] := If[n<0, -(-1)^n, 1] SeriesCoefficient[ x*(1+x-x^2)/(1-4*x^2+x^4), {x, 0, Abs@n}]; (* Michael Somos, Apr 18 2019 *)
    a[ n_] := ChebyshevU[n-1, Sqrt[-1/2]]*Sqrt[2]^(Mod[n, 2]-1)/I^(n-1) //Simplify; (* Michael Somos, Nov 29 2022 *)
  • PARI
    {a(n) = if( n<0, -(-1)^n * a(-n), contfracpnqn(vector(n, i, 1 + (i>1) * (i%2)))[2, 1])}; /* Michael Somos, Jun 05 2003 */
    
  • PARI
    { for (n=0, 50, a=contfracpnqn(vector(n, i, 1+(i>1)*(i%2)))[2, 1]; write("b002530.txt", n, " ", a); ); } \\ Harry J. Smith, Jun 01 2009
    
  • PARI
    my(w=quadgen(12)); A002530(n)=real((2+w)^(n\/2)*if(bittest(n,0),1-w/3,w/3));
    apply(A002530, [0..30]) \\ M. F. Hasler, Nov 04 2019
    
  • Python
    from functools import cache
    @cache
    def a(n): return [0, 1, 1, 3][n] if n < 4 else 4*a(n-2) - a(n-4)
    print([a(n) for n in range(36)]) # Michael S. Branicky, Nov 13 2022
  • Sage
    (x*(1+x-x^2)/(1-4*x^2+x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
    

Formula

G.f.: x*(1 + x - x^2)/(1 - 4*x^2 + x^4).
a(n) = 4*a(n-2) - a(n-4). [Corrected by László Szalay, Feb 21 2014]
a(n) = -(-1)^n * a(-n) for all n in Z, would satisfy the same recurrence relation. - Michael Somos, Jun 05 2003
a(2*n) = a(2*n-1) + a(2*n-2), a(2*n+1) = 2*a(2*n) + a(2*n-1).
From Benoit Cloitre, Dec 15 2002: (Start)
a(2*n) = ((2 + sqrt(3))^n - (2 - sqrt(3))^n)/(2*sqrt(3)).
a(2*n) = A001353(n).
a(2*n-1) = ceiling((1 + 1/sqrt(3))/2*(2 + sqrt(3))^n) = ((3 + sqrt(3))^(2*n - 1) + (3 - sqrt(3))^(2*n - 1))/6^n.
a(2*n-1) = A001835(n). (End)
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n - k, k) * 2^floor((n - 2*k)/2). - Paul Barry, Jul 13 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2) + k, floor((n - 1)/2 - k))*2^k. - Paul Barry, Jun 22 2005
G.f.: (sqrt(6) + sqrt(3))/12*Q(0), where Q(k) = 1 - a/(1 + 1/(b^(2*k) - 1 - b^(2*k)/(c + 2*a*x/(2*x - g*m^(2*k)/(1 + a/(1 - 1/(b^(2*k + 1) + 1 - b^(2*k + 1)/(h - 2*a*x/(2*x + g*m^(2*k + 1)/Q(k + 1)))))))))). - Sergei N. Gladkovskii, Jun 21 2012
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = 1/2*(sqrt(2) + sqrt(6)) and beta = (1/2)*(sqrt(2) - sqrt(6)). Cf. A108412. - Peter Bala, Apr 18 2014
a(n) = (-sqrt(2)*i)^n*S(n, sqrt(2)*i)*2^(-floor(n/2)) = A002605(n)*2^(-floor(n/2)), n >= 0, with i = sqrt(-1) and S the Chebyshev polynomials (A049310). - Wolfdieter Lang, Feb 10 2018
a(n+1)*a(n+2) - a(n+3)*a(n) = (-1)^n, n >= 0. - Kai Wang, Feb 06 2020
E.g.f.: sinh(sqrt(3/2)*x)*(sinh(x/sqrt(2)) + sqrt(2)*cosh(x/sqrt(2)))/sqrt(3). - Stefano Spezia, Feb 07 2020
a(n) = ((1 + sqrt(3))^n - (1 - sqrt(3))^n)/(2*2^floor(n/2))/sqrt(3) = A002605(n)/2^floor(n/2). - Robert FERREOL, Apr 13 2023

Extensions

Definition edited by M. F. Hasler, Nov 04 2019

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

A140827 Interleave denominators and numerators of convergents to sqrt(3).

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 11, 15, 26, 41, 56, 97, 153, 209, 362, 571, 780, 1351, 2131, 2911, 5042, 7953, 10864, 18817, 29681, 40545, 70226, 110771, 151316, 262087, 413403, 564719, 978122, 1542841, 2107560, 3650401, 5757961, 7865521, 13623482, 21489003, 29354524, 50843527, 80198051, 109552575
Offset: 0

Views

Author

Peter H van der Kamp, Jul 18 2008, Jul 22 2008

Keywords

Comments

Coefficients of (1+r)^m modulo r^4-r^2+1.
The first few principal and intermediate convergents to 3^(1/2) are 1/1, 2/1, 3/2, 5/3, 7/4, 12/7; essentially, numerators=A143642 and denominators=A140827. - Clark Kimberling, Aug 27 2008
From Michel Dekking, Mar 11 2020: (Start)
This sequence can be seen as a generalization of the Fibonacci numbers A000045. The Zeckendorf expansion of a natural number uses the Fibonacci numbers as constituents. The Zeckendorf expansion is called a 2-bin decomposition in the paper by Demontigny et al.
The numbers a(n) are the constituents of the 3-bin decomposition of a natural number. See Example 4.2 and Proposition 4.3 in the Demontigny et al. paper.
Any natural number N can be uniquely expanded as
N = Sum_{i=0..k} d(i)*a(i)
under the requirement d(i)d(i+1) = 0, and d(3i)d(3i+2) = 0 for all i.
Here k is the largest integer such that a(k) < N+1.
(End)

Examples

			(1+r)^(2+12*q)=(-1)^q*(a(1+18*q)*(1+r^2)+a(2+18*q)*r).
Here we write N = [d(k)d(k-1)...d(0)] for the 3-bin expansion of N.
0=[0], 1 =[1], 2=[10], 3=[100], 4=[1000], 5=[1001], 6=[1010], 7=[10000], 8=[10001], 9=[10010], 10=[10100], 11=[100000]. - _Michel Dekking_, Mar 11 2020
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Maple
    N:=100: a[0]:=1: a[1]:=1: for i from 2 to N do if i mod 3 = 1 then a[i]:=a[i-1]+a[i-3] else a[i]:=a[i-1]+a[i-2] fi od:
  • Mathematica
    idnc[n_]:=Module[{cvrgts=Convergents[Sqrt[3],n],num,den},num=Take[ Numerator[ cvrgts],{2,-1,2}];den=Denominator[cvrgts]; Riffle[den, num,3]]; idnc[30] (* Harvey P. Dale, Mar 17 2012 *)

Formula

a(n) = 4*a(n-3) - a(n-6).
G.f.: ( 1+x+2*x^2-x^3-x^5 ) / ( 1-4*x^3+x^6 ).
a(n) = a(n-1)+a(n-3) if 3 |(n-1), else a(n)=a(n-1)+a(n-2), with n>1.
a(3*n-1) = A001075(n); a(3*n) = A001835(n-1); a(3*n+1) = A001353(n+1).
a(n)^2 = 1+3*a(n-1)^2 if n==2 (mod 3).
Showing 1-3 of 3 results.