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-7 of 7 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

A084158 a(n) = A000129(n) * A000129(n+1)/2.

Original entry on oeis.org

0, 1, 5, 30, 174, 1015, 5915, 34476, 200940, 1171165, 6826049, 39785130, 231884730, 1351523251, 7877254775, 45912005400, 267594777624, 1559656660345, 9090345184445, 52982414446326, 308804141493510, 1799842434514735, 10490250465594899, 61141660359054660, 356359711688733060
Offset: 0

Views

Author

Paul Barry, May 18 2003

Keywords

Comments

May be called Pell triangles.

Crossrefs

Programs

  • Magma
    [Floor(((Sqrt(2)+1)^(2*n+1)-(Sqrt(2)-1)^(2*n+1)-2*(-1)^n)/16): n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
    
  • Maple
    with(combinat): a:=n->fibonacci(n,2)*fibonacci(n-1,2)/2: seq(a(n), n=1..22); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    LinearRecurrence[{5,5,-1},{0,1,5},30] (* Harvey P. Dale, Sep 07 2011 *)
  • PARI
    Pell(n)=([2, 1; 1, 0]^n)[2, 1];
    a(n)=Pell(n)*Pell(n+1)/2 \\ Charles R Greathouse IV, Mar 21 2016
    
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,5,5]^n*[0;1;5])[1,1] \\ Charles R Greathouse IV, Mar 21 2016
    
  • SageMath
    [(lucas_number2(2*n+1,2,-1) -2*(-1)^n)/16 for n in (0..30)] # G. C. Greubel, Aug 18 2022

Formula

a(n) = ((sqrt(2)+1)^(2*n+1) - (sqrt(2)-1)^(2*n+1) - 2*(-1)^n)/16.
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3). - Mohamed Bouhamida, Sep 02 2006; corrected by Antonio Alberto Olivares, Mar 29 2008
a(n) = (-1/8)*(-1)^n + (( sqrt(2)+1)/16)*(3+2*sqrt(2))^n + ((-sqrt(2)+1)/16)*(3-2*sqrt(2))^n. - Antonio Alberto Olivares, Mar 30 2008
sqrt(a(n) - a(n-1)) = A000129(n). - Antonio Alberto Olivares, Mar 30 2008
O.g.f.: x/((1+x)(1-6*x+x^2)). - R. J. Mathar, May 18 2008
a(n) = A041011(n)*A041011(n+1). - R. K. Guy, May 18 2008
From Mohamed Bouhamida, Aug 30 2008: (Start)
a(n) = 6*a(n-1) - a(n-2) - (-1)^n.
a(n) = 7*(a(n-1) - a(n-2)) + a(n-3) - 2*(-1)^n. (End)
In general, for n>k+1, a(n+k) = A003499(k+1)*a(n-1) - a(n-k-2) - (-1)^n A000129(k+1)^2. - Charlie Marion, Jan 04 2012
For n>0, a(2n-1)*a(2n+1) = oblong(a(2n)); a(2n)*a(2n+2) = oblong(a(2n+1)-1). - Charlie Marion, Jan 09 2012
a(n) = A046729(n)/4. - Wolfdieter Lang, Mar 07 2012
a(n) = sum of squares of first n Pell numbers A000129 (A079291). - N. J. A. Sloane, Jun 18 2012
a(n) = (A002315(n) - (-1)^n)/8. - Adam Mohamed, Sep 05 2024
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*(sqrt(2)-1) (A163960). - Amiram Eldar, Dec 02 2024
G.f.: x * exp( Sum_{k>=1} Pell(3*k)/Pell(k) * x^k/k ). - Seiichi Manyama, May 07 2025

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

A042937 Denominators of continued fraction convergents to sqrt(1000).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 53, 114, 281, 4329, 8939, 22207, 142181, 164388, 306569, 470957, 777526, 1248483, 78183472, 79431955, 157615427, 237047382, 394662809, 631710191, 4184923955, 9001558101, 22188040157, 341822160456, 705832361069, 1753486882594
Offset: 0

Views

Author

Keywords

Examples

			sqrt(1000) = 31.62... = 31 + 1/(1 + 1/(1 + ...)) with convergents 31/1, 32/1, 63/2, 95/3, 158/5, ... - _M. F. Hasler_, Nov 02 2019
		

Crossrefs

Cf. A042936 (numerators), A040968 (continued fraction), A010467 (decimals).
Analog for sqrt(m): A000129 (m=2), A002530 (m=3), A001076 (m=5), A041007 (m=6), A041009 (m=7), A041011 (m=8), A005663 (m=10), A041015 (m=11), A041017 (m=12), ..., A042933 (m=998), A042935 (m=999).

Programs

  • Mathematica
    Denominator[Convergents[Sqrt[1000], 30]] (* Vincenzo Librandi, Feb 01 2014 *)
  • PARI
    A42937=contfracpnqn(c=contfrac(sqrt(1000)),#c-1)[2,] \\ Possibly incorrect last term ignored. NB: a(n) = A42937[n+1]. For more terms use e.g. \p999, or compute any a(n) from this as in A042936. - M. F. Hasler, Nov 01 2019

Extensions

More terms from Vincenzo Librandi, Feb 01 2014

A192062 Square Array T(ij) read by antidiagonals (from NE to SW) with columns 2j being the denominators of continued fraction convergents to square root of (j^2 + 2j).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 0, 1, 1, 3, 3, 1, 0, 1, 1, 4, 4, 5, 3, 0, 1, 1, 5, 5, 11, 8, 1, 0, 1, 1, 6, 6, 19, 15, 13, 4, 0, 1, 1, 7, 7, 29, 24, 41, 21, 1, 0, 1, 1, 8, 8, 41, 35, 91, 56, 34, 5, 0, 1, 1, 9, 9, 55, 48, 169, 115, 153, 55, 1, 0, 1, 1, 10, 10, 71, 63, 281, 204, 436, 209, 89, 6
Offset: 0

Views

Author

Kenneth J Ramsey, Jun 21 2011

Keywords

Comments

Column j=1 is the Fibonacci sequence A000045. Column 2 is A002530; column 4 is A041011; column 6 is A041023; column 8 is A041039, column 10 is A041059, column 12 is A041083, column 14 is A041111 corresponding the denominators of continued fraction convergents to square root of 3,8,15,24,35,48 and 63.
T(2*i-1,j)*T(2*i,j)^2*T(2*i+1,j)*j/2 appears to be always a triangular number, T(j*T(2*i,j)^2).
T(2*i,j)*T(2*i+1,j)^2*T(2*i+2)*j/2 appears to always equal a triangular number, T(j*T(2*i,j)*T(2*i+2,j)).
Conjecture re relation of A192062 to the sequence of primes: T(2*n,j) = A(n,j)*T(n,j) where A(n,j) is from the square array A191971. There, A(3*n,j) = A(n,j)*B(n,j) where B(n,j) are integers. It appears further that B(5*n,j)=B(n,j)*C(n,j); C(7*n,j)= C(n,j)*D(n,j); D(11*n,j) = D(n,j)*E(n,j); E(13*n,j) = E(n,j)*F(n,j) and F(17*n,j) = F(n,j)*G(n,j) where C(n,j), D(n,j) etc. are all integers. My conjecture is that this property continues indefinitely and follows the sequence of primes.

Examples

			Array as meant by the definition
First column has index j=0
0  0  0   0   0   0   0 ...
1  1  1   1   1   1   1 ...
1  1  1   1   1   1   1 ...
1  2  3   4   5   6   7 ...
2  3  4   5   6   7   8 ...
1  5 11  19  29  41  55 ...
3  8 15  24  35  48  63 ...
1 13 41  91 169 281 433 ...
4 21 56 115 204 329 496 ...
.
.
.
		

Crossrefs

Formula

Each column j is a recursive sequence defined by T(0,j)=0, T(1,j) = 1, T(2i,j)= T(2i-2,j)+T(2i-1,j) and T(2i+1,j) = T(2i-1,j)+j*T(2i,j). Also, T(n+2,j) = (j+2)*T(n,j)-T(n-2,j).
T(2n,j) = Sum(k=1 to n) C(k)*T(2*k,j-1) where the C(k) are the n-th row of the triangle A191579.
T(2*i,j) = T(i,j)*A(i,j) where A(i,j) is from the table A(i,j) of A191971.
T(4*i,j) = (T(2*i+1)^2 - T(2*i-1)^2)/j
T(4*i+2,j) = T(2*i+2,j)^2 - T(2*i,j)^2

Extensions

Corrected and edited by Olivier Gérard, Jul 05 2011

A089499 a(0)=0; a(1)=1; a(2n) = 4*Sum_{k=0..n} a(2k-1); a(2n+1) = a(2n) + a(2n-1).

Original entry on oeis.org

0, 1, 4, 5, 24, 29, 140, 169, 816, 985, 4756, 5741, 27720, 33461, 161564, 195025, 941664, 1136689, 5488420, 6625109, 31988856, 38613965, 186444716, 225058681, 1086679440, 1311738121, 6333631924, 7645370045, 36915112104, 44560482149
Offset: 0

Views

Author

Charlie Marion, Nov 11 2003

Keywords

Comments

1, 4, 5, 24, 29, 140, ...= numerators in convergents to (sqrt(8) - 2) = continued fraction [0; 1, 4, 1, 4, 1, 4, ...]; where sqrt(8) - 2 = 0.828427124... = the inradius of a right triangle with hypotenuse 6, legs sqrt(32) and 2. Denominators of convergents to [0; 1, 4, 1, 4, 1, 4, ...] = A041011 starting (1, 5, 6, 29, 35, ...). - Gary W. Adamson, Dec 22 2007
This 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, May 12 2014

Crossrefs

Cf. A041011.

Programs

Formula

For n > 0, a(n) = A001333(n) + A084068(n-1)*(-1)^n.
a(n)*a(n+1) = A046729(n).
a(2n+1) = A001653(n); a(2n) = A005319(n).
a(1) = 1, a(2n) = 4*a(2n-1) + a(2n-2); a(2n-1) = a(2n-2) + a(2n-3). Given the 2 X 2 matrix X = [1, 4; 1, 5], [a(2n-1), a(2n)] = top row of X^n. The sequence starting (1, 4, 5, 24, 29, ...) = numerators in continued fraction [0; 1, 4, 1, 4, 1, 4, ...] = (sqrt(8) - 2) = 0.828427124... E.g., X^3 = [29, 140; 35, 169], where 29/35, 140/169 are convergents to (sqrt(8)-2). - Gary W. Adamson, Dec 22 2007
From R. J. Mathar, Jul 08 2009: (Start)
a(n) = A000129(n)*A000034(n+1).
a(n) = 6*a(n-2) - a(n-4).
G.f.: -x*(-1-4*x+x^2)/((x^2-2*x-1)*(x^2+2*x-1)). (End)
From Peter Bala, May 12 2014: (Start)
a(2*n + 1) = A041011(2*n + 1); a(2*n) = 4*A041011(2*n).
For n odd, a(n) = (alpha^n - beta^n)/(alpha - beta), and for n even, a(n) = 4*(alpha^n - beta^n)/(alpha^2 - beta^2), where alpha = 1 + sqrt(2) and beta = 1 - sqrt(2).
a(n) = Product_{j = 1..floor(n/2)} ( 4 + 4*cos^2(j*Pi/n) ) for n >= 1. (End)

Extensions

Corrected by T. D. Noe, Nov 08 2006
Definition corrected by Jonathan Sondow, Jun 06 2014

A152118 a(n) = Product_{k=1..floor((n-1)/2)} (4 + 4*cos(k*Pi/n)^2).

Original entry on oeis.org

1, 1, 1, 5, 6, 29, 35, 169, 204, 985, 1189, 5741, 6930, 33461, 40391, 195025, 235416, 1136689, 1372105, 6625109, 7997214, 38613965, 46611179, 225058681, 271669860, 1311738121, 1583407981, 7645370045, 9228778026, 44560482149, 53789260175, 259717522849
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Nov 24 2008

Keywords

Comments

Product_{k=1..floor((n-1)/2)} (m + 4*cos(k*Pi/n)^2) for m=1,2,3,4 respectively give A000045, A002530, A136211 and this sequence.
Apparently the same as A041011 after the initial term. - R. J. Mathar, Nov 27 2008

Crossrefs

Cf. A041011 (essentially the same).

Programs

  • Maple
    with(combinat); a := n -> `if`(n = 0, 1, fibonacci(n, 2)/2^((n + 1) mod 2)); seq(a(n), n = 0 .. 31); # Miles Wilson, Aug 04 2024
  • Mathematica
    a = Table[Product[4 + 4*Cos[k*Pi/n]^2, {k, 1, (n - 1)/2}], {n, 0, 30}]; FullSimplify[ExpandAll[a]] Round[%]
    Join[{1}, LinearRecurrence[{0, 6, 0, -1}, {1, 1, 5, 6}, 20]] (* G. C. Greubel, Mar 28 2016 *)
  • PARI
    a(n) = round(prod(k=1, (n-1)/2, 4 + 4*cos(k*Pi/n)^2)) \\ Colin Barker, Oct 23 2013
    
  • PARI
    Vec((x^4-x^3-5*x^2+x+1)/((x^2-2*x-1)*(x^2+2*x-1)) + O(x^50)) \\ Colin Barker, Mar 28 2016

Formula

From Colin Barker, Oct 23 2013: (Start)
a(n) = 6*a(n-2)-a(n-4) for n>4.
G.f.: (x^4-x^3-5*x^2+x+1) / ((x^2-2*x-1)*(x^2+2*x-1)). (End)
a(n) = ((-(-1 - sqrt(2))^n - 3*(1-sqrt(2))^n + (-1+sqrt(2))^n + 3*(1+sqrt(2))^n)) / (8*sqrt(2)) for n>0. - Colin Barker, Mar 28 2016
E.g.f.: (1/(2*sqrt(2)))*(2*sqrt(2) + (2*cosh(x) + sinh(x))*sinh(sqrt(2)*x)). - G. C. Greubel, Mar 28 2016
Showing 1-7 of 7 results.