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.

A041011 Denominators of continued fraction convergents to sqrt(8).

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

Comments

Sqrt(8) = 2 + continued fraction [0; 1, 4, 1, 4, 1, 4, ...] = 4/2 + 4/5 + 4/(5*29) + 4/(29*169) + 4/(169*985) + ... - Gary W. Adamson, Dec 21 2007
This is the sequence of Lehmer numbers U_n(sqrt(R),Q) with the parameters R = 4 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, May 12 2014
Apparently the same as A152118(n). - Georg Fischer, Jul 01 2019

Crossrefs

Programs

  • Magma
    I:=[1, 1, 5, 6]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 10 2013
    
  • Maple
    with(combinat): a := n -> fibonacci(n + 1, 2)/2^(n mod 2):
    seq(a(n), n = 0 .. 28); # Miles Wilson, Aug 04 2024
  • Mathematica
    Denominator[NestList[(4/(4 + #))&, 0, 60]] (* Vladimir Joseph Stephan Orlovsky, Apr 13 2010 *)
    CoefficientList[Series[(x + x^2 - x^3)/(1 - 6 x^2 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 10 2013 *)
    a0[n_] := ((3-2*Sqrt[2])^n*(2+Sqrt[2])-(-2+Sqrt[2])*(3+2*Sqrt[2])^n)/4 // Simplify
    a1[n_] := (-(3-2*Sqrt[2])^n+(3+2*Sqrt[2])^n)/(4*Sqrt[2]) // Simplify
    Flatten[MapIndexed[{a0[#], a1[#]} &,Range[20]]] (* Gerry Martens, Jul 11 2015 *)
    LinearRecurrence[{0,6,0,-1},{1,1,5,6},40] (* Harvey P. Dale, Oct 21 2024 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,6,0]^n*[1;1;5;6])[1,1] \\ Charles R Greathouse IV, Nov 13 2015
    
  • PARI
    my(x='x+O('x^99)); concat(0, Vec((1+x-x^2)/(1-6*x^2+x^4))) \\ Altug Alkan, Mar 27 2016

Formula

a(2n) = A000129(2n+1), a(2n+1) = A000129(2n+2)/2.
a(n) = 6*a(n-2) - a(n-4). Also:
a(2n) = a(2n-1)+a(2n-2), a(2n+1)=4*a(2n)+a(2n-1).
G.f.: (1+x-x^2)/(1-6*x^2+x^4).
From Peter Bala, May 12 2014: (Start)
For n even, a(n) = (alpha^n - beta^n)/(alpha - beta), and for n odd, a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2), where alpha = 1 + sqrt(2) and beta = 1 - sqrt(2).
a(n) = Product_{k = 1..floor((n-1)/2)} ( 4 + 4*cos^2(k*Pi/n) ) for n >= 1. (End)
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*(2+sqrt(2))-(-2+sqrt(2))*(3+2*sqrt(2))^n)/4.
a1(n) = (-(3-2*sqrt(2))^n+(3+2*sqrt(2))^n)/(4*sqrt(2)). (End)
a(n) = ((-(-1 - sqrt(2))^n - 3*(1-sqrt(2))^n + (-1+sqrt(2))^n + 3*(1+sqrt(2))^n))/(8*sqrt(2)). - Colin Barker, Mar 27 2016

Extensions

Entry improved by Michael Somos
First term 0 in b-file, formulas and programs removed by Georg Fischer, Jul 01 2019

A176014 Decimal expansion of (3+sqrt(21))/6.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Apr 06 2010

Keywords

Comments

Continued fraction expansion of (3+sqrt(21))/6 is A010684.
Also greatest eigenvalue of the 6 X 6 matrix [[3 0 0 3 0 0][0 0 0 0 1 0][0 3 0 0 3 0][0 0 0 0 1 0][0 0 3 0 0 3][0 0 0 0 1 0]]/3. It is conjectured that this is lim_{k->infinity} A005186(k+1)/A005186(k), i.e., the asymptotic growth rate of the number of numbers with the same total stopping time in the Collatz iteration. - Hugo Pfoertner, Sep 28 2020

Examples

			(3+sqrt(21))/6 = 1.26376261582597333443...
		

Crossrefs

Cf. A010477 (decimal expansion of sqrt(21)).
Cf. A010684 (repeat 1, 3), A136210, A136211.

Programs

  • Mathematica
    RealDigits[(3+Sqrt[21])/6,10,120][[1]] (* Harvey P. Dale, Jul 21 2023 *)
  • PARI
    vecmax(mateigen([1,0,0,1,0,0; 0,0,0,0,1/3,0; 0,1,0,0,1,0; 0,0,0,0,1/3,0; 0,0,1,0,0,1; 0,0,0,0,1/3,0],1)[1]) \\ Hugo Pfoertner, Sep 28 2020

A136210 Numerators in continued fraction [0; 1, 3, 1, 3, 1, 3, ...].

Original entry on oeis.org

1, 3, 4, 15, 19, 72, 91, 345, 436, 1653, 2089, 7920, 10009, 37947, 47956, 181815, 229771, 871128, 1100899, 4173825, 5274724, 19997997, 25272721, 95816160, 121088881, 459082803, 580171684, 2199597855, 2779769539, 10538906472
Offset: 1

Views

Author

Gary W. Adamson, Dec 21 2007

Keywords

Comments

A136210(n)/A136211(n) tends to 0.7912878474... = (sqrt(21) - 3)/2 = continued fraction [0; 1, 3, 1, 3, 1, 3, ...] = the inradius of a right triangle with hypotenuse 5, legs 2 and sqrt(21).
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 14 2014

Examples

			a(4) = 15 = 3*a(3) + a(2) = 3*4 + 3.
a(5) = 19 = a(4) + a(3) = 15 + 4.
T^3 = [19, 72; 24, 91], where [19, 72] = [a(5), a(6)]. [24, 91] = [A136211(5), A136211(6)].
G.f. = x + 3*x^2 + 4*x^3 + 15*x^4 + 19*x^5 + 72*x^6 + 91*x^7 + 345*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a = {1, 3}; Do[If[EvenQ[n], AppendTo[a, 3*a[[ -1]] + a[[ -2]]], AppendTo[a, a[[ -1]] + a[[ -2]]]], {n, 3, 30}]; a (* Stefan Steinerberger, Dec 31 2007 *)
    a[n_] := FromContinuedFraction[ Join[{0}, 3 - 2*Array[Mod[#, 2]&, n]]] // Numerator; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, May 15 2014 *)
  • PARI
    {a(n) = (-1)^((n+1) * (n<0)) * polcoeff( x * (1 + 3*x - x^2) / (1 - 5*x^2 + x^4) + x * O(x^abs(n)), abs(n))}; /* Michael Somos, May 15 2014 */

Formula

a(0) = 0, a(1) = 1, a(2n) = 3*a(2n-1) + a(2n-2); a(2n-1) = a(2n-2) + a(2n-3). Given the 2 X 2 matrix [1, 3; 1, 4] = T, [a(2n-1), a(2n)] = top row of T^n.
g.f.: x*(1+3*x-x^2)/(1-5*x^2+x^4). - Colin Barker, Jan 04 2012
a(-n) = -(-1)^n * a(n). a(2*n - 1) = A004253(n). a(2*n) = 3 * A004254(n). - Michael Somos, May 15 2014
a(n+1) - a(n-1) = a(n) * (2 - (-1)^n) for all n in Z. - Michael Somos, May 15 2014

Extensions

More terms from Stefan Steinerberger, Dec 31 2007

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

A180062 Irregular triangle by rows derived from variants of Cartan matrices: 1's in the super and subdiagonals and 3,4,4,4,... in the main diagonal alternating with 4,4,4,...

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 7, 11, 1, 8, 15, 1, 11, 38, 41, 1, 12, 46, 56, 1, 15, 81, 186, 153, 1, 16, 93, 232, 209, 1, 19, 140, 49, 859, 571, 1, 20, 156, 592, 1091, 780, 1, 23, 215, 1044, 2774, 3821, 2131, 1, 24, 235, 1200, 3366, 4912, 2911, 1, 27, 306, 1885, 6810, 14418
Offset: 1

Views

Author

Gary W. Adamson, Aug 08 2010

Keywords

Comments

Row sums starting with row 2 = A136211: (1, 4, 5, 19, 24, ...) = denominators in convergents to [1, 3, 1, 3, 1, 3, ...].
Rightmost terms in each row = A002530, denominators in convergents to [1, 2, 1, 2, 1, 2, ...], prefaced with a 1 for row 1. Odd-indexed row rightmost terms = Product_{k=1..(n-1)/2} (2 + 4*cos^2(k*2*Pi/n))
Example: x^3 - 11x^2 + 38x + 41 = row 7 relating to the heptagon, with roots = 5.246979..., 3.554958..., and 2.19806226, product = 41 (same result as using the product formula).
Even-indexed rows related to even-sided regular polygons; but use the product formula: rightmost terms in even rows >2 = Product_{k=1..(n-2)/2} (2 + 4*cos^2(k*Pi/n)).
Using the product formula or root products with row 8 relating to the octagon, we obtain 5.414..., * 4 * 2.585... = 56, rightmost term of row 8.
Shifted columns of A180062 = triangle A180063.

Examples

			First few rows of the triangle:
  1;
  1;
  1,  3;
  1,  4;
  1,  7,  11;
  1,  8,  15;
  1, 11,  38,   41;
  1, 12,  46,   56;
  1, 15,  81,  186,   153;
  1, 16,  93,  232,   209;
  1, 19, 140,  499,   859,    571;
  1, 20, 156,  592,  1091,    780;
  1, 23, 215, 1044,  2774,   3821,   2131;
  1, 24, 235, 1200,  3366,   4912,   2911;
  1, 27, 306, 1885,  6810,  14418,  26556,   7953;
  1, 28, 330, 2120,  8010,  17784,  21468,  10864;
  1, 31, 413, 3086, 14135,  40614,  71454,  70356,  29681;
  1, 32, 441, 3416, 16255,  48624,  89238,  91824,  40545;
  1, 35, 536, 4711, 26173,  95269, 227100, 341754, 294549, 110771;
  1, 36, 568, 5152, 29589, 111524, 275724, 430992, 386373, 151316;
  ...
Examples:
Row 7 = x^3 - 11 x^2 + 38x + 41, charpoly of the 3 X 3 matrix [3,1,0; 1,4,1; 0,1,4], then changing (-) signs to (+).
Row 8 = x^3 - 12x^2 + 46x - 56, = charpoly of [4,1,0; 1,4,1; 0,1,4].
		

Crossrefs

Formula

Triangle read by rows generated from Cartan-like matrices, 1's in the super and subdiagonals, with alternates of (3,4,4,4,...) for odd-indexed rows and (4,4,4,...) for even-indexed rows. The first nontrivial matrix = [3,1; 1,4] with charpoly x^2 - 7x + 11, becoming row 5: (1, 7, 11); generating row 3: (x^2 - 7x + 11). Rows begin 1; 1; 1,3; 1,4;...
The first few rows can be constructed using the following set of rules:
Rightmost terms in each row = A002530, denominators in continued fraction [1, 2, 1, 2, 1, 2,...] = (1, 3, 4, 11, 15,...), while row sums = A136211, denominators in [1, 3, 1, 3, 1, 3,...] = (1, 4, 5, 19, 24,...) given row 1 = 1.
Negative signs in the charpolys are changed to + in the triangle.
Showing 1-5 of 5 results.