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

A001911 a(n) = Fibonacci(n+3) - 2.

Original entry on oeis.org

0, 1, 3, 6, 11, 19, 32, 53, 87, 142, 231, 375, 608, 985, 1595, 2582, 4179, 6763, 10944, 17709, 28655, 46366, 75023, 121391, 196416, 317809, 514227, 832038, 1346267, 2178307, 3524576, 5702885, 9227463, 14930350, 24157815, 39088167, 63245984
Offset: 0

Views

Author

Keywords

Comments

This is the sequence A(0,1;1,1;2) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 17 2010
Ternary words of length n - 1 with subwords (0, 1), (0, 2) and (2, 2) not allowed. - Olivier Gérard, Aug 28 2012
For subsets of (1, 2, 3, 5, 8, 13, ...) Fibonacci Maximal terms (Cf. A181631) equals the number of leading 1's per subset. For example, (7-11) in Fibonacci Maximal = (1010, 1011, 1101, 1110, 1111), numbers of leading 1's = (1 + 1 + 2 + 3 + 4) = 11 = a(4) = row 4 of triangle A181631. - Gary W. Adamson, Nov 02 2010
As in our 2009 paper, we use two types of Fibonacci trees: - Ta: Fibonacci analog of binomial trees; Tb: Binary Fibonacci trees. Let D(r(k)) be the sum over all distances of the form d(r, x), across all vertices x of the tree rooted at r of order k. Ignoring r, but overloading, let D(a(k)) and D(b(k)) be the distance sums for the Fibonacci trees Ta and Tb respectively of the order k. Using the sum-of-product form in Equations (18) and (21) in our paper it follows that F(k+4) - 2 = D(a(k+1)) - D(b(k-1)). - K.V.Iyer and P. Venkata Subba Reddy, Apr 30 2011
a(n) is the length of the n-th palindromic prefix of the infinite Fibonacci word A003849. - Dimitri Hendriks, May 19 2014
The first k terms of the infinite Fibonacci word A014675 are palindromic if and only if k is a positive term of this sequence. - Clark Kimberling, Jul 14 2014
Can be expressed in terms of a rule similar to Recamán's sequence (A005132). Instead of following the Recamán rule "subtract if possible, otherwise add", this sequence follows the rule "If subtraction is possible, do nothing; otherwise add." For example when at the fourth term, 6, it is possible to subtract 4 (giving 2 which is not in {0, 1, 3, 6}) so nothing is done with 4. It is not possible to subtract 5 (6-5=1, which is in {0, 1, 3, 6}), so it is added, resulting in 11. - Matthew Malone, Jan 03 2020
For n>=1, a(n) is the maximum number of vertices (Moore bound) of a (1,1)-regular mixed graph with diameter n-1. - Miquel A. Fiol, Jun 24 2024
Repunits in the lazy Fibonacci representation (A104326), and which is the first row of array A372501. - A.H.M. Smeets, Jun 25 2025

Examples

			G.f. = x + 3*x^2 + 6*x^3 + 11*x^4 + 19*x^5 + 32*x^6 + 53*x^7 + 87*x^8 + ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 233.
  • 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).

Crossrefs

Cf. A001611, A000071, A157725, A001911, A157726, A006327, A157727, A157728, A157729, A167616. [Added by N. J. A. Sloane, Jun 25 2010 in response to a comment from Aviezri S. Fraenkel]
Partial sums of A000045(n+1).
Right-hand column 3 of triangle A011794.
See also A165910.
Subsequence of A226538.
Column k=3 of A261019.

Programs

  • Haskell
    a001911 n = a001911_list !! n
    a001911_list = 0 : 1 : map (+ 2) (zipWith (+) a001911_list $ tail a001911_list)
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Magma
    [(Fibonacci(n+3))-2: n in [0..85]]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=a[n-1]+a[n-2]+2 od: seq(a[n],n=0..50); # Miklos Kristof, Mar 09 2005
    A001911:=(1+z)/(z-1)/(z**2+z-1); # Simon Plouffe in his 1992 dissertation with another offset
    a:= n-> (Matrix([[0,-1,1]]). Matrix([[1,1,0], [1,0,0], [2,0,1]])^n)[1,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
  • Mathematica
    Table[Fibonacci[n+3] -2, {n,0,50}] (* Vladimir Joseph Stephan Orlovsky, Nov 19 2010 *)
    LinearRecurrence[{2,0,-1}, {0,1,3}, 40] (* Harvey P. Dale, Jun 06 2011 *)
    Fibonacci[Range[3,40]]-2 (* Harvey P. Dale, Jun 28 2015 *)
  • PARI
    a(n)=fibonacci(n+3)-2 \\ Charles R Greathouse IV, Mar 14 2012
    
  • SageMath
    [fibonacci(n+3)-2 for n in range(60)] # G. C. Greubel, Oct 21 2024

Formula

From Michael Somos, Jun 09 1999: (Start)
a(n) = A000045(n+3) - 2.
a(n) = a(n-1) + a(n-2) + 2, a(0) = 0, a(1) = 1. (End)
G.f.: x*(1+x)/((1-x)*(1-x-x^2)).
Sum of consecutive pairs of A000071 (partial sums of Fibonacci numbers). - Paul Barry, Apr 17 2004
a(n) = A101220(2, 1, n). - Ross La Haye, Jan 28 2005
a(n) = A108617(n+1, 2) = A108617(n+1, n-1) for n > 0. - Reinhard Zumkeller, Jun 12 2005
a(n) = term (1,1) in the 1 X 3 matrix [0,-1,1].[1,1,0; 1,0,0; 2,0,1]^n. - Alois P. Heinz, Jul 24 2008
a(0) = 0, a(1) = 1, a(2) = 3, a(n) = 2*a(n-1)-a(n-3). - Harvey P. Dale, Jun 06 2011
Eigensequence of an infinite lower triangular matrix with the natural numbers as the left border and (1, 0, 1, 0, ...) in all other columns. - Gary W. Adamson, Jan 30 2012
a(n) = (-2+(2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5))+(1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, May 12 2016
a(n) = A000032(6+n)-1 mod A000045(6+n). - Mario C. Enriquez, Apr 01 2017
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - 2*exp(x). - Stefano Spezia, May 08 2022

Extensions

More terms and better description from Michael Somos

A027934 a(0)=0, a(1)=1, a(2)=2; for n > 2, a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).

Original entry on oeis.org

0, 1, 2, 5, 11, 24, 51, 107, 222, 457, 935, 1904, 3863, 7815, 15774, 31781, 63939, 128488, 257963, 517523, 1037630, 2079441, 4165647, 8342240, 16702191, 33433039, 66912446, 133899917, 267921227, 536038872, 1072395555, 2145305339
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n with at least one even part (offset 2). - Vladeta Jovovic, Dec 29 2004
First differences of A008466. a(n) = A008466(n+2) - A008466(n+1). - Alexander Adamchuk, Apr 06 2006
Starting with "1" = eigensequence of a triangle with the Fibonacci series as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
An elephant sequence, see A175654. For the corner squares 24 A[5] vectors, with decimal values between 11 and 416, lead to this sequence (without the leading 0). For the central square these vectors lead to the companion sequence A099036 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
a(n) = Sum_{k=1..n} A108617(n,k) / 2. - Reinhard Zumkeller, Oct 07 2012
a(n) is the number of binary strings that contain the substring 11 or end in 1. a(3) = 5 because we have: 001, 011, 101, 110, 111. - Geoffrey Critzer, Jan 04 2014
a(n-1), n >= 1, is the number of nonexisting (due to the maturation delay) "[male-female] pairs of Fibonacci rabbits" at the beginning of the n-th month. - Daniel Forgues, May 06 2015
a(n-1) is the number of subsets of {1,2,..,n} that contain n that have at least one pair of consecutive integers. For example, for n=5, a(4) = 11 and the 11 subsets are {4,5}, {1,2,5}, {1,4,5}, {2,3,5}, {2,4,5}, {3,4,5}, {1,2,3,5}, {1,2,4,5}, {1,3,4,5}, {2,3,4,5}, {1,2,3,4,5}. Note that A008466(n) is the number of all subsets of {1,2,..,n} that have at least one pair of consecutive integers. - Enrique Navarrete, Aug 15 2020

Crossrefs

Row sums of triangle A131767. - Gary W. Adamson, Jul 13 2007
a(n) = A101220(1, 2, n+1).
T(n, n) + T(n, n+1) + ... + T(n, 2n), T given by A027926.
Diagonal sums of A055248.

Programs

  • GAP
    List([0..35], n-> 2^n - Fibonacci(n+1) ); # G. C. Greubel, Sep 27 2019
  • Haskell
    a027934 n = a027934_list !! n
    a027934_list = 0 : 1 : 2 : zipWith3 (\x y z -> 3 * x - y - 2 * z)
                   (drop 2 a027934_list) (tail a027934_list) a027934_list
    -- Reinhard Zumkeller, Oct 07 2012
    
  • Magma
    [2^n - Fibonacci(n+1): n in [0..35]]; // G. C. Greubel, Sep 27 2019
    
  • Maple
    A027934:= proc(n) local K; K:= Matrix ([[2,0,0], [0,1,1], [0,1,0]])^n; K[1,1]-K[2,2] end: seq (A027934(n), n=0..31); # Alois P. Heinz, Jul 28 2008
    a := n -> 2^n - combinat:-fibonacci(n+1): seq(a(n),n=0..31); # Peter Luschny, May 09 2015
  • Mathematica
    nn=31; a:=1/(1-x-x^2); b:=1/(1-2x); CoefficientList[Series[a*x*(1+x*b), {x,0,nn}], x] (* Geoffrey Critzer, Jan 04 2014 *)
    LinearRecurrence[{3,-1,-2}, {0,1,2}, 32] (* Jean-François Alcover, Jan 09 2016 *)
    nxt[{a_,b_,c_}]:={b,c,3c-b-2a}; NestList[nxt,{0,1,2},40][[;;,1]] (* Harvey P. Dale, Feb 02 2025 *)
  • PARI
    a(n)=2^n-fibonacci(n+1) \\ Charles R Greathouse IV, Jun 11 2015
    
  • Sage
    [2^n - fibonacci(n+1) for n in (0..35)] # G. C. Greubel, Sep 27 2019
    

Formula

a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..n-2*j} binomial(n-j, n-2*j-k). - Paul Barry, Feb 07 2003
From Paul Barry, Jan 23 2004: (Start)
Row sums of A105809.
G.f.: x*(1-x)/((1-2*x)*(1-x-x^2)).
a(n) = 2^n - Fibonacci(n+1). (End) - corrected Apr 06 2006 and Oct 05 2012
a(n) = Sum_{j=0..n} Sum_{k=0..n} binomial(n-k, k+j). - Paul Barry, Aug 29 2004
a(n) = (Sum of (n+1)-th row of the triangle in A108617) / 2. - Reinhard Zumkeller, Jun 12 2005
a(n) = term (1,1) - term (2,2) in the 3 X 3 matrix [2,0,0; 0,1,1; 0,1,0]^n. - Alois P. Heinz, Jul 28 2008
a(n) = 2^n - A000045(n+1). - Geoffrey Critzer, Jan 04 2014
a(n) ~ 2^n. - Daniel Forgues, May 06 2015
From Bob Selcoe, Mar 29 2016: (Start)
a(n) = 2*a(n-1) + A000045(n-2).
a(n) = 4*a(n-2) + A000032(n-2). (End)
a(n) = 2^(n-1) - ( ((1+sqrt(5))/2)^n - ((1-sqrt(5))/2)^n)/sqrt(5). - Haider Ali Abdel-Abbas, Aug 17 2019

Extensions

Simpler definition from Miklos Kristof, Nov 24 2003
Initial zero added by N. J. A. Sloane, Feb 13 2008
Definition fixed by Reinhard Zumkeller, Oct 07 2012

A074829 Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Fibonacci number.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 5, 7, 8, 7, 5, 8, 12, 15, 15, 12, 8, 13, 20, 27, 30, 27, 20, 13, 21, 33, 47, 57, 57, 47, 33, 21, 34, 54, 80, 104, 114, 104, 80, 54, 34, 55, 88, 134, 184, 218, 218, 184, 134, 88, 55, 89, 143, 222, 318, 402, 436, 402, 318, 222, 143, 89
Offset: 1

Views

Author

Joseph L. Pe, Sep 30 2002

Keywords

Examples

			The first and second Fibonacci numbers are 1, 1, so the first and second rows of the triangle are 1; 1 1; respectively. The third row of the triangle begins and ends with the third Fibonacci number, 2 and the middle term is the sum of the contiguous two terms in the second row, i.e., 1 + 1 = 2, so the third row is 2 2 2.
Triangle begins:
   1;
   1,  1;
   2,  2,  2;
   3,  4,  4,   3;
   5,  7,  8,   7,   5;
   8, 12, 15,  15,  12,   8;
  13, 20, 27,  30,  27,  20, 13;
  21, 33, 47,  57,  57,  47, 33, 21;
  34, 54, 80, 104, 114, 104, 80, 54, 34;
  ...
Formatted as a symmetric triangle:
                           1;
                        1,    1;
                     2,    2,    2;
                  3,    4,    4,    3;
               5,    7,    8,    7,    5;
            8,   12,   15,   15,   12,    8;
        13,   20,   27,   30,   27,   20,   13;
     21,   33,   47,   57,   57,   47,   33,   21;
  34,   54,   80,  104,  114,  104,   80,   54,   34;
		

Crossrefs

Some other Fibonacci-Pascal triangles: A027926, A036355, A037027, A105809, A108617, A109906, A111006, A114197, A162741, A228074.
Cf. A074878 (row sums).

Programs

  • GAP
    T:= function(n,k)
        if k=1 then return Fibonacci(n);
        elif k=n then return Fibonacci(n);
        else return T(n-1,k-1) + T(n-1,k);
        fi;
      end;
    Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # G. C. Greubel, Jul 12 2019
  • Haskell
    a074829 n k = a074829_tabl !! (n-1) !! (k-1)
    a074829_row n = a074829_tabl !! (n-1)
    a074829_tabl = map fst $ iterate
       (\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [u]))) ([1], [1,1])
    -- Reinhard Zumkeller, Aug 15 2013
    
  • Maple
    A074829 := proc(n,k)
        option remember ;
        if k=1 or k=n then
            combinat[fibonacci](n) ;
        else
            procname(n-1,k-1)+procname(n-1,k) ;
        end if;
    end proc:
    seq(seq(A074829(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Mar 31 2025
  • Mathematica
    T[n_, 1]:= Fibonacci[n]; T[n_, n_]:= Fibonacci[n]; T[n_, k_]:= T[n-1, k-1] + T[n-1, k]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]//Flatten (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    T(n,k) = if(k==1 || k==n, fibonacci(n), T(n-1,k-1) + T(n-1,k));
    for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    def T(n, k):
        if (k==1 or k==n): return fibonacci(n)
        else: return T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 12 2019
    

Extensions

More terms from Philippe Deléham, Sep 20 2006
Data error in 7th row fixed by Reinhard Zumkeller, Aug 15 2013

A227550 A triangle formed like Pascal's triangle, but with factorial(n) on the borders instead of 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 6, 4, 4, 6, 24, 10, 8, 10, 24, 120, 34, 18, 18, 34, 120, 720, 154, 52, 36, 52, 154, 720, 5040, 874, 206, 88, 88, 206, 874, 5040, 40320, 5914, 1080, 294, 176, 294, 1080, 5914, 40320, 362880, 46234, 6994, 1374, 470, 470, 1374, 6994, 46234, 362880, 3628800
Offset: 0

Views

Author

Vincenzo Librandi, Aug 04 2013

Keywords

Comments

A003422 gives the second column (after 0).

Examples

			Triangle begins:
       1;
       1,     1;
       2,     2,    2;
       6,     4,    4,    6;
      24,    10,    8,   10,  24;
     120,    34,   18,   18,  34, 120;
     720,   154,   52,   36,  52, 154,  720;
    5040,   874,  206,   88,  88, 206,  874, 5040;
   40320,  5914, 1080,  294, 176, 294, 1080, 5914, 40320;
  362880, 46234, 6994, 1374, 470, 470, 1374, 6994, 46234, 362880;
		

Crossrefs

Cf. similar triangles with t on the borders: A007318 (t = 1), A028326 (t = 2), A051599 (t = prime(n)), A051601 (t = n), A051666 (t = n^2), A108617 (t = fibonacci(n)), A134636 (t = 2n+1), A137688 (t = 2^n), A227075 (t = 3^n).
Cf. A003422.
Cf. A227791 (central terms), A001563, A074911.

Programs

  • Haskell
    a227550 n k = a227550_tabl !! n !! k
    a227550_row n = a227550_tabl !! n
    a227550_tabl = map fst $ iterate
       (\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws))
       ([1], a001563_list)
    -- Reinhard Zumkeller, Aug 05 2013
    
  • Magma
    function T(n,k)
      if k eq 0 or k eq n then return Factorial(n);
      else return T(n-1,k-1) + T(n-1,k);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 02 2021
    
  • Mathematica
    t = {}; Do[r = {}; Do[If[k == 0||k == n, m = n!, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
  • Sage
    def T(n,k): return factorial(n) if (k==0 or k==n) else T(n-1, k-1) + T(n-1, k)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021

Formula

From G. C. Greubel, May 02 2021: (Start)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = T(n, n) = n!.
Sum_{k=0..n} T(n, k) = 2^n * (1 +Sum_{j=1..n-1} j*j!/2^j) = A140710(n). (End)

A167821 a(n) is the number of n-tosses having a run of 3 or more heads or a run of 3 or more tails for a fair coin (i.e., probability is a(n)/2^n).

Original entry on oeis.org

0, 0, 2, 6, 16, 38, 86, 188, 402, 846, 1760, 3630, 7438, 15164, 30794, 62342, 125904, 253782, 510758, 1026684, 2061730, 4136990, 8295872, 16627166, 33311646, 66716028, 133582106, 267406998, 535206832, 1071049286, 2143127030, 4287918140, 8578528818
Offset: 1

Views

Author

V.J. Pohjola, Nov 13 2009

Keywords

Comments

A167821(n) is the difference between A000918(n), the number of branches of a complete binary tree of n levels, and the number of recursive calls needed to compute the (n+1)-th Fibonacci number F(n+1) as defined in A019274: A167821(n) = A000918(n) - A019274(n+1). - Denis Lorrain, Jan 14 2012
Partial sums of A027934 multiplied term by term by 2 (as shown by the second formula), i.e., partial sums of row sums of A108617. - J. M. Bergot, Oct 02 2012, clarified by R. J. Mathar, Oct 05 2012

Crossrefs

Programs

  • Magma
    [2^n-2*Fibonacci(n+1): n in [1..40]]; // Vincenzo Librandi, Jun 28 2016
  • Mathematica
    CoefficientList[Series[(2 x^2)/(1 - 3 x + x^2 + 2 x^3), {x, 0, 30}], x]
    Table[2^n - 2*Fibonacci[n + 1], {n, 1, 31}]
    LinearRecurrence[{3, -1, -2}, {0, 0, 2}, 50] (* G. C. Greubel, Jun 27 2016 *)

Formula

G.f.: (2 x^2)/(1 - 3 x + x^2 + 2 x^3);
a(n) = 2^n - 2*Fibonacci(n+1).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3). - G. C. Greubel, Jun 27 2016

A316938 Triangle read by rows formed using Pascal's rule except that n-th row begins and ends with Fibonacci(n+4).

Original entry on oeis.org

3, 5, 5, 8, 10, 8, 13, 18, 18, 13, 21, 31, 36, 31, 21, 34, 52, 67, 67, 52, 34, 55, 86, 119, 134, 119, 86, 55, 89, 141, 205, 253, 253, 205, 141, 89, 144, 230, 346, 458, 506, 458, 346, 230, 144, 233, 374, 576, 804, 964, 964, 804, 576, 374, 233, 377, 607, 950, 1380, 1768, 1928, 1768, 1380, 950, 607, 377
Offset: 0

Views

Author

Vincenzo Librandi, Jul 27 2018

Keywords

Comments

Row sums give A316937.

Examples

			Triangle begins:
    3;
    5,   5;
    8,  10,   8;
   13,  18,  18,  13;
   21,  31,  36,  31,  21;
   34,  52,  67,  67,  52,  34;
   55,  86, 119, 134, 119,  86,  55;
   89, 141, 205, 253, 253, 205, 141,  89;
  144, 230, 346, 458, 506, 458, 346, 230, 144;
...
		

Crossrefs

Cf. A000045 (Fibonacci numbers), A316937 (row sums).
Other Fibonacci borders: A074829, A108617, A316939.

Programs

  • Mathematica
    t={}; Do[r={}; Do[If[k==0||k==n, m=Fibonacci[n+4], m=t[[n,k]]+t[[n,k+1]]]; r=AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t

A316939 Triangle read by rows formed using Pascal's rule except that n-th row begins and ends with Fibonacci(n+2).

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 5, 7, 7, 5, 8, 12, 14, 12, 8, 13, 20, 26, 26, 20, 13, 21, 33, 46, 52, 46, 33, 21, 34, 54, 79, 98, 98, 79, 54, 34, 55, 88, 133, 177, 196, 177, 133, 88, 55, 89, 143, 221, 310, 373, 373, 310, 221, 143, 89, 144, 232, 364, 531, 683, 746, 683, 531, 364, 232, 144, 233, 376, 596, 895, 1214, 1429
Offset: 0

Views

Author

Vincenzo Librandi, Jul 28 2018

Keywords

Examples

			Triangle begins:
   1;
   2,  2;
   3,  4,   3;
   5,  7,   7,   5;
   8, 12,  14,  12,   8;
  13, 20,  26,  26,  20,  13;
  21, 33,  46,  52,  46,  33,  21;
  34, 54,  79,  98,  98,  79,  54, 34;
  55, 88, 133, 177, 196, 177, 133, 88, 55;
  ...
		

Crossrefs

Cf. A316528 (row sums).
Columns k=0..2: A000045, A000071, A001924.
Other Fibonacci borders: A074829, A108617, A316938.

Programs

  • Maple
    f:= proc(n,k) option remember;
      if k=0 or k=n then combinat:-fibonacci(n+2) else procname(n-1,k)+procname(n-1,k-1) fi
    end proc:
    for n from 0 to 10 do
      seq(f(n,k),k=0..n)
    od; # Robert Israel, Sep 20 2018
  • Mathematica
    t={}; Do[r={}; Do[If[k==0||k==n, m=Fibonacci[n + 2], m=t[[n, k]] + t[[n, k + 1]]]; r=AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t // Flatten

Extensions

Incorrect g.f. removed by Georg Fischer, Feb 18 2020

A176085 a(n) = A136431(n,n).

Original entry on oeis.org

0, 1, 3, 11, 41, 155, 591, 2267, 8735, 33775, 130965, 509015, 1982269, 7732659, 30208749, 118167055, 462760369, 1814091011, 7118044023, 27952660883, 109853552255, 432021606103, 1700093447847, 6694137523051, 26372544576331, 103950885100775, 409928481296331
Offset: 0

Views

Author

Paul Curtz, Apr 08 2010

Keywords

Comments

a(n+1) is also the number of sequences of length 2n obeying the regular expression "0^* (1 or 2)^* 3^*" and having sum 3n. For example, a(3)=11 because of the sequences 0033, 0123, 0213, 0222, 1113, 1122, 1212, 1221, 2112, 2121, 2211. - Don Knuth, May 11 2016

Crossrefs

Programs

  • GAP
    List([0..30], n-> Sum([0..n], k-> Binomial(2*n-k-1, n-k)*Fibonacci(k) )); # G. C. Greubel, Nov 28 2019
  • Magma
    [(&+[Binomial(2*n-k-1, n-k)*Fibonacci(k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Nov 28 2019
    
  • Maple
    with(combinat); seq( add(binomial(2*n-k-1, n-k)*fibonacci(k), k=0..n), n=0..30); # G. C. Greubel, Nov 28 2019
    1/(sqrt(1 - 4*x) + 1/x - 4): series(%, x, 27):
    seq(coeff(%, x, k), k=0..26); # Peter Luschny, May 29 2021
  • Mathematica
    t[n_, k_]:= CoefficientList[ Series[x/(1-x-x^2)/(1-x)^k, {x,0,k}], x][[k+1]]; Array[ t[#, #] &, 20]
    Table[Sum[Binomial[2*n-k-1, n-k]*Fibonacci[k], {k,0,n}], {n,0,30}] (* G. C. Greubel, Nov 28 2019 *)
  • Maxima
    a(n):=sum(fib(k)*binomial(2*n-k-1,n-k),k,1,n); /*  Vladimir Kruchinin, Mar 17 2016 */
    
  • PARI
    a(n) = sum(k=1, n, fibonacci(k)*binomial(2*n-k-1, n-k)) \\ Michel Marcus, Mar 17 2016
    
  • Sage
    [sum(binomial(2*n-k-1, n-k)*fibonacci(k) for k in (0..n)) for n in (0..30)] # G. C. Greubel, Nov 28 2019
    

Formula

a(n+1) - 4*a(n) = -A081696(n-1).
From Vaclav Kotesovec, Oct 21 2012: (Start)
G.f.: x*(x-sqrt(1-4*x))/(sqrt(1-4*x)*(x^2+4*x-1)).
Recurrence: (n-2)*a(n) = 2*(4*n-9)*a(n-1) - (15*n-38)*a(n-2) - 2*(2*n-5)* a(n-3).
a(n) ~ 4^n/sqrt(Pi*n). (End)
a(n) = Sum_{k=1..n} (F(k)*binomial(2*n-k-1,n-k)), where F(k) = A000045(k). - Vladimir Kruchinin, Mar 17 2016
Simpler g.f.: x/sqrt(1-4*x)/(x+sqrt(1-4*x)). - Don Knuth, May 11 2016
a(n) = A000045(3*n) - A054441(n). - Hrishikesh Venkataraman, May 27 2021
a(n) = 4*a(n-1) + a(n-2) - binomial(2*n-4,n-2) for n>=2. - Hrishikesh Venkataraman, Jul 02 2021
a(n) = A108617(2n,n)/2. - Alois P. Heinz, Jan 26 2025

A347584 Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Lucas number.

Original entry on oeis.org

2, 1, 1, 3, 2, 3, 4, 5, 5, 4, 7, 9, 10, 9, 7, 11, 16, 19, 19, 16, 11, 18, 27, 35, 38, 35, 27, 18, 29, 45, 62, 73, 73, 62, 45, 29, 47, 74, 107, 135, 146, 135, 107, 74, 47, 76, 121, 181, 242, 281, 281, 242, 181, 121, 76, 123, 197, 302, 423, 523, 562, 523, 423, 302, 197, 123
Offset: 0

Views

Author

Noah Carey and Greg Dresden, Sep 07 2021

Keywords

Comments

Similar in spirit to the Fibonacci-Pascal triangle A074829, which uses Fibonacci numbers instead of Lucas numbers at the ends of each row.
If we consider the top of the triangle to be the 0th row, then the sum of terms in n-th row is 2*(2^(n+1) - Lucas(n+1)). This sum also equals 2*A027973(n-1) for n>0.

Examples

			The first two Lucas numbers (for n=0 and n=1) are 2 and 1, so the first two rows (again, for n=0 and n=1) of the triangle are 2 and 1, 1 respectively.
Triangle begins:
               2;
             1,  1;
           3,  2,  3;
         4,  5,  5,  4;
       7,  9, 10,  9,  7;
    11, 16, 19, 19, 16, 11;
  18, 27, 35, 38, 35, 27, 18;
		

Crossrefs

Cf. A227550, A228196 (general formula).
Fibonacci borders: A074829, A108617, A316938, A316939.

Programs

  • Mathematica
    T[n_, 0] := LucasL[n]; T[n_, n_] := LucasL[n];
    T[n_, k_] := T[n - 1, k - 1] + T[n - 1, k];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten

Formula

a(n) = 2*A074829(n+1) - A108617(n).

A379837 Triangle read by rows formed using Pascal's rule except that n-th row begins and ends with Fibonacci(n+3).

Original entry on oeis.org

2, 3, 3, 5, 6, 5, 8, 11, 11, 8, 13, 19, 22, 19, 13, 21, 32, 41, 41, 32, 21, 34, 53, 73, 82, 73, 53, 34, 55, 87, 126, 155, 155, 126, 87, 55, 89, 142, 213, 281, 310, 281, 213, 142, 89, 144, 231, 355, 494, 591, 591, 494, 355, 231, 144
Offset: 0

Views

Author

Vincenzo Librandi, Jan 26 2025

Keywords

Examples

			Triangle begins:
      k= 0   1   2  3    4   5   6
  n=0:   2;
  n=1:   3,  3;
  n=2:   5,  6,  5;
  n=3:   8, 11, 11, 8;
  n=4:  13, 19, 22, 19, 13;
  n=5:  21, 32, 41, 41, 32, 21;
  n=6:  34, 53, 73, 82, 73, 53, 34;
  ...
		

Crossrefs

Programs

  • Mathematica
    // As triangle // t={};Do[r={};Do[If[k==0||k==n,m=Fibonacci[n+3],m=t[[n,k]]+t[[n,k+1]]];r=AppendTo[r,m],{k,0,n}];AppendTo[t,r],{n,0,11}];t
Showing 1-10 of 10 results.