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 61-70 of 199 results. Next

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A040020 Continued fraction for sqrt(26).

Original entry on oeis.org

5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 0

Views

Author

Keywords

Examples

			5.09901951359278483002822... = 5 + 1/(10 + 1/(10 + 1/(10 + 1/(10 + ...)))). - _Harry J. Smith_, Jun 03 2009
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010481 (decimal expansion), A041040/A041041 (convergents), A248253 (Egyptian fraction).

Programs

Formula

From Elmo R. Oliveira, Feb 06 2024: (Start)
a(n) = 10 for n >= 1.
G.f.: 5*(1+x)/(1-x).
E.g.f.: 10*exp(x) - 5.
a(n) = 5*A040000(n). (End)

A040042 Continued fraction for sqrt(50) = 5*sqrt(2).

Original entry on oeis.org

7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
Offset: 0

Views

Author

Keywords

Examples

			7.07106781186547524400844... = 7 + 1/(14 + 1/(14 + 1/(14 + 1/(14 + ...)))). - _Harry J. Smith_, Jun 01 2009
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010503 (decimal expansion), A041084/A041085 (convergents), A248275 (Egyptian fraction).
Cf. A040000.

Programs

  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[50],300] (* Vladimir Joseph Stephan Orlovsky, Mar 07 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 47000); x=contfrac(sqrt(50)); for (n=0, 20000, write("b040042.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009

Formula

From Elmo R. Oliveira, Feb 07 2024: (Start)
a(n) = 14 = A010853(n) for n >= 1.
G.f.: 7*(1+x)/(1-x).
E.g.f.: 14*exp(x) - 7.
a(n) = 7*A040000(n). (End)

A182579 Triangle read by rows: T(0,0) = 1, for n>0: T(n,n) = 2 and for k<=floor(n/2): T(n,2*k) = n/(n-k) * binomial(n-k,k), T(n,2*k+1) = (n-1)/(n-1-k) * binomial(n-1-k,k).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 2, 1, 1, 5, 4, 5, 2, 1, 1, 6, 5, 9, 5, 2, 1, 1, 7, 6, 14, 9, 7, 2, 1, 1, 8, 7, 20, 14, 16, 7, 2, 1, 1, 9, 8, 27, 20, 30, 16, 9, 2, 1, 1, 10, 9, 35, 27, 50, 30, 25, 9, 2, 1, 1, 11, 10, 44, 35, 77, 50, 55, 25, 11, 2
Offset: 0

Views

Author

Reinhard Zumkeller, May 06 2012

Keywords

Comments

A000204(n+1) = sum of n-th row, Lucas numbers;
A000204(n+3) = alternating row sum of n-th row;
A182584(n) = T(2*n,n), central terms;
A000012(n) = T(n,0), left edge;
A040000(n) = T(n,n), right edge;
A054977(n-1) = T(n,1) for n > 0;
A109613(n-1) = T(n,n-1) for n > 0;
A008794(n) = T(n,n-2) for n > 1.

Examples

			Starting with 2nd row = [1 2] the rows of the triangle are defined recursively without computing explicitely binomial coefficients; demonstrated for row 8, (see also Haskell program):
   (0) 1  1  7  6 14  9  7  2      [A]  row 7 prepended by 0
    1  1  7  6 14  9  7  2 (0)     [B]  row 7, 0 appended
    1  0  1  0  1  0  1  0  1      [C]  1 and 0 alternating
    1  0  7  0 14  0  7  0  0      [D]  = [B] multiplied by [C]
    1  1  8  7 20 14 16  7  2      [E]  = [D] added to [A] = row 8.
The triangle begins:                 | A000204
              1                      |       1
             1  2                    |       3
            1  1  2                  |       4
           1  1  3  2                |       7
          1  1  4  3  2              |      11
         1  1  5  4  5  2            |      18
        1  1  6  5  9  5  2          |      29
       1  1  7  6 14  9  7  2        |      47
      1  1  8  7 20 14 16  7  2      |      76
     1  1  9  8 27 20 30 16  9  2    |     123
    1  1 10  9 35 27 50 30 25  9  2  |     199 .
		

Crossrefs

Programs

  • Haskell
    a182579 n k = a182579_tabl !! n !! k
    a182579_row n = a182579_tabl !! n
    a182579_tabl = [1] : iterate (\row ->
      zipWith (+) ([0] ++ row) (zipWith (*) (row ++ [0]) a059841_list)) [1,2]
  • Mathematica
    T[_, 0] = 1;
    T[n_, n_] /; n > 0 = 2;
    T[_, 1] = 1;
    T[n_, k_] := T[n, k] = Which[
         OddQ[k],  T[n - 1, k - 1],
         EvenQ[k], T[n - 1, k - 1] + T[n - 1, k]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)

Formula

T(n+1,2*k+1) = T(n,2*k), T(n+1,2*k) = T(n,2*k-1) + T(n,2*k).

A280560 a(n) = (-1)^n * 2 if n!=0, with a(0) = 1.

Original entry on oeis.org

1, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2
Offset: 0

Views

Author

Michael Somos, Jan 05 2017

Keywords

Examples

			G.f. = 1 - 2*x + 2*x^2 - 2*x^3 + 2*x^4 - 2*x^5 + 2*x^6 - 2*x^7 + 2*x^8 - 2*x^9 + ...
		

Crossrefs

Programs

  • Magma
    [n eq 0 select 1 else 2*(-1)^n: n in [0..75]]; // G. C. Greubel, Jul 29 2018; Mar 28 2024
    
  • Mathematica
    a[ n_] := (-1)^n (2 - Boole[n == 0]);
    PadRight[{1},120,{2,-2}] (* Harvey P. Dale, Jun 04 2019 *)
  • PARI
    {a(n) = (-1)^n * if(n, 2, 1)};
    
  • SageMath
    [2*(-1)^n -int(n==0) for n in range(76)] # G. C. Greubel, Mar 28 2024

Formula

Euler transform of length 2 sequence [-2, 1].
Moebius transform is length 2 sequence [-2, 4].
a(n) = -2*A033999(n) if n!=0.
G.f.: (1 - x) / (1 + x) = 1 / (1 + 2*x / (1 - x)) = 1 - 2*x / (1 + x).
E.g.f.: 2*exp(-x) - 1.
a(n) = a(-n) for all n in Z.
a(n) = A084100(2*n) = A084100(2*n + 1), if n>=0.
a(n) = (-1)^n * A040000(n).
a(2*n) = A040000(n).
Convolution inverse is A040000.

A287839 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9.

Original entry on oeis.org

1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # Wesley Ivan Hurt, Nov 25 2017
  • Mathematica
    LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 117][n]
     return 10*a(n-1) + 7*a(n-2)
    

Formula

For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.
G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).
a(n) = (((5-4*sqrt(2))^n*(-3+2*sqrt(2)) + (3+2*sqrt(2))*(5+4*sqrt(2))^n)) / (4*sqrt(2)). - Colin Barker, Nov 25 2017

A329508 Array read by upward antidiagonals: row n = coordination sequence for cylinder formed by rolling up a strip of width n hexagons cut from the hexagonal grid by cuts parallel to grid lines.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 3, 5, 2, 1, 3, 6, 5, 2, 1, 3, 6, 8, 4, 2, 1, 3, 6, 9, 8, 4, 2, 1, 3, 6, 9, 11, 7, 4, 2, 1, 3, 6, 9, 12, 11, 6, 4, 2, 1, 3, 6, 9, 12, 14, 10, 6, 4, 2, 1, 3, 6, 9, 12, 15, 14, 9, 6, 4, 2, 1, 3, 6, 9, 12, 15, 17, 13, 8, 6, 4, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2019

Keywords

Comments

This is the structure of carbon nanotubes.
For the case when the cuts are perpendicular to the grid lines, see A329512 and A329515.
See A329501 and A329504 for coordination sequences for cylinders formed by rolling up the square grid.

Examples

			Array begins:
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...
1, 3, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, ...
1, 3, 6, 8, 8, 7, 6, 6, 6, 6, 6, 6, ...
1, 3, 6, 9, 11, 11, 10, 9, 8, 8, 8, 8, ...
1, 3, 6, 9, 12, 14, 14, 13, 12, 11, 10, 10, ...
1, 3, 6, 9, 12, 15, 17, 17, 16, 15, 14, 13, ...
1, 3, 6, 9, 12, 15, 18, 20, 20, 19, 18, 17, ...
1, 3, 6, 9, 12, 15, 18, 21, 23, 23, 22, 21, ...
1, 3, 6, 9, 12, 15, 18, 21, 24, 26, 26, 25, ...
1, 3, 6, 9, 12, 15, 18, 21, 24, 27, 29, 29, ...
The initial antidiagonals are:
1
1,2
1,3,2
1,3,5,2
1,3,6,5,2
1,3,6,8,4,2
1,3,6,9,8,4,2
1,3,6,9,11,7,4,2
1,3,6,9,12,11,6,4,2
1,3,6,9,12,14,10,6,4,2
...
		

Crossrefs

Rows 1,2,3,4 are A040000, A329509, A329510, A329511.

Programs

  • Magma
    c := 4; \\ set c
    R := RationalFunctionField(Integers());
    FG3 := FreeGroup(3);
    Q3 := quo;
    H := AutomaticGroup(Q3);
    f3 := GrowthFunction(H);
    PSR := PowerSeriesRing(Integers():Precision := 60);
    Coefficients(PSR!f3);
    // 1, 3, 6, 9, 11, 11, 10, 9, 8, 8, 8, 8, 8, 8, 8, ... (row c)
    f3;  // g.f. for row c
    // (x^8 + x^7 + x^6 - 2*x^4 - 3*x^3 - 3*x^2 - 2*x - 1)/(x - 1)
    // = (1+x)*(x^3-x-1)*(x^2+1)^2/(x-1)

Formula

The g.f.s for the rows were found and proved using the "trunks and branches" method (see Goodman-Strauss and Sloane). In the illustrations for n=4 and n=5, the trunks are colored blue, the branches red, and the twigs green.
The g.f. G(c) for row c (c>=1) is
(1/(1-x))*(1 + 2*x + 3*x^2*(1-x^(c-2))/(1-x) + 2*x^c - x^(c+2)*(1-x^(c-1))/(1-x)).
The values of G(1) through G(8) are:
(1+x)/(1-x),
(1+x)*(x^3-x^2-x-1)/(x-1),
(1+x)*(x^2+x+1)*(x^3-x^2-1)/(x-1),
(1+x)*(x^3-x-1)*(x^2+1)^2/(x-1),
(1+x)*(x^4+x^3+x^2+x+1)*(x^5-x^4+x^3-x^2-1)/(x-1),
(1+x)*(x^2+x+1)*(x^2-x+1)*(x^7-x^2-x-1)/(x-1),
(1+x)*(x^6+x^5+x^4+x^3+x^2+x+1)*(x^7-x^6+x^5-x^4+x^3-x^2-1)/(x-1),
(1+x)*(x^7-x^5+x^3-x-1)*(x^4+1)*(x^2+1)^2/(x-1).
Note that row n is equal to 2*n once the 2*n-th term has been reached.
The g.f.s for the rows can also be calculated by regarding the 1-skeleton of the cylinder as the Cayley diagram for an appropriate group H, and computing the growth function for H (see the MAGMA code).

A040056 Continued fraction for sqrt(65).

Original entry on oeis.org

8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
Offset: 0

Views

Author

Keywords

Examples

			8.06225774829854965236661... = 8 + 1/(16 + 1/(16 + 1/(16 + 1/(16 + ...)))).
		

Crossrefs

Cf. A010517 (decimal expansion), A041112/A041113 (convergents), A248289 (Egyptian fraction).

Programs

  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[65],300] (* Vladimir Joseph Stephan Orlovsky, Mar 08 2011 *)
    PadRight[{8},120,{16}] (* Harvey P. Dale, Nov 27 2020 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 49000); x=contfrac(sqrt(65)); for (n=0, 20000, write("b040056.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 07 2009

Formula

From Elmo R. Oliveira, Feb 10 2024: (Start)
a(n) = 16 = A010855(n) for n >= 1.
G.f.: 8*(1+x)/(1-x).
E.g.f.: 16*exp(x) - 8.
a(n) = 8*A040000(n) = 4*A040002(n) = 2*A040012(n). (End)

A040072 Continued fraction for sqrt(82).

Original entry on oeis.org

9, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18
Offset: 0

Views

Author

Keywords

Examples

			9.05538513813741662657380... = 9 + 1/(18 + 1/(18 + 1/(18 + 1/(18 + ...)))). - _Harry J. Smith_, Jun 10 2009
		

Crossrefs

Cf. A010533 (decimal expansion), A041144/A041145 (convergents), A248305 (Egyptian fraction).

Programs

  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[82],300] (* Vladimir Joseph Stephan Orlovsky, Mar 09 2011 *)
    PadRight[{9},120,{18}] (* Harvey P. Dale, Oct 09 2020 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 51000); x=contfrac(sqrt(82)); for (n=0, 20000, write("b040072.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 10 2009

Formula

From Elmo R. Oliveira, Feb 10 2024: (Start)
a(n) = 18 = A010857(n) for n >= 1.
G.f.: 9*(1+x)/(1-x).
E.g.f.: 18*exp(x) - 9.
a(n) = 9*A040000(n) = 3*A040006(n). (End)

A098599 Riordan array ((1+2*x)/(1+x), (1+x)).

Original entry on oeis.org

1, 1, 1, -1, 2, 1, 1, 0, 3, 1, -1, 0, 2, 4, 1, 1, 0, 0, 5, 5, 1, -1, 0, 0, 2, 9, 6, 1, 1, 0, 0, 0, 7, 14, 7, 1, -1, 0, 0, 0, 2, 16, 20, 8, 1, 1, 0, 0, 0, 0, 9, 30, 27, 9, 1, -1, 0, 0, 0, 0, 2, 25, 50, 35, 10, 1, 1, 0, 0, 0, 0, 0, 11, 55, 77, 44, 11, 1, -1, 0, 0, 0, 0, 0, 2, 36, 105, 112, 54, 12, 1, 1, 0, 0, 0, 0, 0, 0, 13, 91, 182, 156, 65, 13, 1
Offset: 0

Views

Author

Paul Barry, Sep 17 2004

Keywords

Examples

			Triangle begins as:
   1;
   1, 1;
  -1, 2, 1;
   1, 0, 3, 1;
  -1, 0, 2, 4, 1;
   1, 0, 0, 5, 5,  1;
  -1, 0, 0, 2, 9,  6,  1;
   1, 0, 0, 0, 7, 14,  7,  1;
  -1, 0, 0, 0, 2, 16, 20,  8, 1;
   1, 0, 0, 0, 0,  9, 30, 27, 9, 1;
		

Crossrefs

Row sums are A098600.
Diagonal sums are A098601.
Apart from signs, same as A100218.
Very similar to triangle A111125.

Programs

  • Magma
    A098599:= func< n,k | n eq 0 select 1 else Binomial(k, n-k) + Binomial(k-1, n-k-1) >;
    [A098599(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 27 2024
    
  • Mathematica
    T[n_, k_]:= If[n==0, 1, Binomial[k,n-k] +Binomial[k-1,n-k-1]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 27 2024 *)
  • SageMath
    def A098599(n,k): return 1 if n==0 else binomial(k, n-k) + binomial(k-1, n-k-1)
    flatten([[A098599(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Mar 27 2024

Formula

Triangle: T(n, k) = binomial(k, n-k) + binomial(k-1, n-k-1), with T(0, 0) = 1.
Sum_{k=0..n} T(n, k) = A098600(n) (row sums).
T(n,k) = T(n-1,k-1) - T(n-1,k) + 2*T(n-2,k-1) + T(n-3,k-1), T(0,0)=1, T(1,0)=1, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 09 2014
From G. C. Greubel, Mar 27 2024: (Start)
T(2*n, n) = A040000(n).
T(2*n+1, n) = A000007(n).
T(2*n-1, n) = A005408(n-1), n >= 1.
Sum_{k=0..n} (-1)^k*T(n, k) = A079757(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A098601(n). (End)
Previous Showing 61-70 of 199 results. Next