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

A131269 a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) with n>3, a(0)=1, a(1)=2, a(2)=3, a(3)=6.

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 35, 60, 101, 168, 277, 454, 741, 1206, 1959, 3178, 5151, 8344, 13511, 21872, 35401, 57292, 92713, 150026, 242761, 392810, 635595, 1028430, 1664051, 2692508, 4356587, 7049124, 11405741, 18454896, 29860669, 48315598, 78176301, 126491934
Offset: 0

Views

Author

Gary W. Adamson, Jun 23 2007

Keywords

Comments

Row sums of triangles A131268 and A131270.
a(n)/a(n-1) tends to phi (A001622).

Examples

			a(4) = 11 = sum of row 4 terms of triangle A131268: (1 + 1 + 5 + 3 + 1), or the reversed terms of triangle A131270, row 4.
		

Crossrefs

Cf. A001595 (first differences).

Programs

  • GAP
    List([0..40], n-> 2*Fibonacci(n+2)-n-1); # G. C. Greubel, Jul 09 2019
  • Magma
    /* By the first comment: */ [&+[2*Binomial(n-Floor((k+1)/2), Floor(k/2))-1: k in [0..n]]: n in [0..40]]; /* Bruno Berselli, May 03 2012 */
    
  • Magma
    [2*Fibonacci(n+2)-n-1: n in [0..40]]; // G. C. Greubel, Jul 09 2019
    
  • Mathematica
    LinearRecurrence[{3, -2, -1, 1}, {1, 2, 3, 6}, 41] (* Bruno Berselli, May 03 2012 *)
    Table[2*Fibonacci[n+2]-n-1, {n,0,40}] (* G. C. Greubel, Jul 09 2019 *)
  • Maxima
    makelist(expand(((1+sqrt(5))^(n+2)-(1-sqrt(5))^(n+2) )/(2^(n+1)*sqrt(5))-n-1), n, 0, 40); /* Bruno Berselli, May 03 2012 */
    
  • PARI
    Vec((1-x-x^2+2*x^3)/((1-x-x^2)*(1-x)^2)+O(x^40)) \\ Bruno Berselli, May 03 2012
    
  • PARI
    vector(40, n, n--; 2*fibonacci(n+2)-n-1) \\ G. C. Greubel, Jul 09 2019
    
  • Python
    prpr = 1
    prev = 2
    for n in range(2,99):
        current = prpr + prev + n - 2
        print(prpr, end=',')
        prpr = prev
        prev = current  # Alex Ratushnyak, May 02 2012
    
  • Sage
    [2*fibonacci(n+2)-n-1 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

a(n) = a(n-2) + a(n-1) + n - 2 with n>1, a(0)=1, a(1)=2. - Alex Ratushnyak, May 02 2012
From Bruno Berselli, May 03 2012: (Start)
G.f.: (1-x-x^2+2*x^3)/((1-x-x^2)*(1-x)^2). - Bruno Berselli, May 03 2012
a(n) = A001595(n+1) - n = A006355(n+3) - n - 1 = ((1+sqrt(5))^(n+2) - (1-sqrt(5))^(n+2))/(2^(n+1)*sqrt(5))-n-1. (End)

Extensions

Better definition and more terms from Bruno Berselli, May 03 2012

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

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 3, 1, 1, 1, 7, 5, 5, 1, 1, 1, 9, 7, 11, 5, 1, 1, 1, 11, 9, 19, 11, 7, 1, 1, 1, 13, 11, 29, 19, 19, 7, 1, 1, 1, 15, 13, 41, 29, 39, 19, 9, 1, 1, 1, 17, 15, 55, 41, 69, 39, 29, 9, 1, 1, 1, 19, 17, 71, 55, 111, 69, 69, 29, 11, 1, 1, 1, 21, 19, 89, 71, 167, 111, 139, 69, 41, 11, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 23 2007

Keywords

Comments

Row sums are in A131269. Reversal = triangle A131270.

Examples

			Triangle begins:
1;
1, 1;
1, 1,  1;
1, 1,  3,  1;
1, 1,  5,  3,  1;
1, 1,  7,  5,  5,  1;
1, 1,  9,  7, 11,  5,   1;
1, 1, 11,  9, 19, 11,   7,   1;
1, 1, 13, 11, 29, 19,  19,   7,   1;
1, 1, 15, 13, 41, 29,  39,  19,   9,  1;
1, 1, 17, 15, 55, 41,  69,  39,  29,  9,  1;
1, 1, 19, 17, 71, 55, 111,  69,  69, 29, 11,  1;
1, 1, 21, 19, 89, 71, 167, 111, 139, 69, 41, 11, 1;
...
		

Crossrefs

Programs

  • Magma
    [2*Binomial(n-Floor((k+1)/2), Floor(k/2))-1: k in [0..n], n in [0..14]]; // Bruno Berselli, May 03 2012
    
  • Maple
    T := proc (n, k) options operator, arrow; 2*binomial(n-floor((1/2)*k+1/2), floor((1/2)*k))-1 end proc: for n from 0 to 12 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form. - Emeric Deutsch, Jul 15 2007
  • Mathematica
    Table[2*Binomial[n -Floor[(k+1)/2], Floor[k/2]] -1, {n,0,14}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    T(n,k) = 2*binomial(n- (k+1)\2, k\2) -1; \\ G. C. Greubel, Jul 10 2019
    
  • Sage
    [[2*binomial(n -floor((k+1)/2), floor(k/2)) -1 for k in (0..n)] for n in (0..14)] # G. C. Greubel, Jul 10 2019

Formula

Equals 2*A065941 - A000012, where A065941 = Pascal's triangle with repeated columns; and A000012 = (1; 1,1; 1,1,1;...) as an infinite lower triangular matrix.

Extensions

More terms from Emeric Deutsch, Jul 15 2007
Showing 1-2 of 2 results.