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 11 results. Next

A230447 T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 5, 3, 3, 6, 9, 8, 6, 3, 9, 16, 17, 14, 9, 4, 12, 25, 33, 32, 23, 15, 4, 16, 38, 58, 65, 55, 39, 24, 5, 20, 54, 96, 124, 120, 94, 63, 40, 5, 25, 75, 150, 220, 244, 215, 157, 103, 64, 6, 30, 100, 225, 371, 464, 459, 372, 261, 167, 104
Offset: 0

Views

Author

Johannes W. Meijer, Oct 19 2013

Keywords

Comments

The terms in the right hand columns of triangle T(n, k) and the terms in the rows of the square array Tsq(n, k) represent the Kn1p sums of the ‘Races with Ties’ triangle A035317.
For the definitions of the Kn1p sums see A180662. This sequence is related to A230448.
The first few row sums are: 1, 2, 6, 14, 32, 68, 144, 299, 616, 1258, 2559, 5185, 10478, … .

Examples

			The first few rows of triangle T(n, k) n >= 0 and 0 <= k <= n.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1
1|  1,  1
2|  2,  2,  2
3|  2,  4,  5,   3
4|  3,  6,  9,   8,   6
5|  3,  9, 16,  17,  14,    9
6|  4, 12, 25,  33,  32,   23,    15
7|  4, 16, 38,  58,  65,   55,    39,   24
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1,  1,  2,   3,   6,    9,   15,   24
1|  1,  2,  5,   8,  14,   23,   39,   63
2|  2,  4,  9,  17,  32,   55,   94,  157
3|  2,  6, 16,  33,  65,  120,  215,  372
4|  3,  9, 25,  58, 124,  244,  459,  831
5|  3, 12, 38,  96, 220,  464,  924, 1755
6|  4, 16, 54, 150, 371,  835, 1759, 3514
7|  4, 20, 75, 225, 596, 1431, 3191, 6705
		

Crossrefs

Programs

  • Maple
    T := proc(n, k): add(A035317(n-i, n-k+i), i=0..floor(k/2)) end: A035317 := proc(n, k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(T(n, k), k=0..n), n=0..10); # End first program.
    T := proc(n, k) option remember: if k=0 then return(A008619(n)) elif k=n then return(A080239(n+1)) else A230135(n, k) + procname(n-1, k) + procname(n-1, k-1) fi: end: A008619 := n -> floor(n/2) +1: A080239 := n -> add(combinat[fibonacci](n-4*k), k=0..floor((n-1)/4)): A230135 := proc(n, k): if ((k mod 4 = 2) and (n mod 2 = 1)) or ((k mod 4 = 0) and (n mod 2 = 0)) then return(1) else return(0) fi: end: seq(seq(T(n, k), k=0..n), n=0..10); # End second program.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + A230135(n, k) with T(n, 0) = A008619(n) and T(n, n) = A080239(n+1), n >= 0 and 0 <= k <= n.
T(n, k) = sum(A035317(n-i, n-k+i), i = 0..floor(k/2)), n >= 0 and 0 <= k <= n.
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
Tsq(n, k) = sum(A035317(n+k-i, n+i), i=0..floor(k/2)), n >= 0 and k >= 0.
Tsq(n, k) = A080239(2*n+k+1) - sum(A035317(2*n+k-i, i), i=0..n-1).
The G.f. generates the terms in the n-th row of the square array Tsq(n, k).
G.f.: a(n)/(4*(x-1)) + 1/(4*(x+1)) + (-1)^n*(x+2)/(10*(x^2+1)) - (A000032(2*n+3) + A000032(2*n+2)*x)/(5*(x^2+x-1)) + sum((-1)^(k+1) * A064831(n-k+1)/((x-1)^k), k= 2..n), n >= 0, with a(n) = A064831(n+1) + 2*A064831(n) - 2*A064831(n-1) + A064831(n-2).

A001654 Golden rectangle numbers: F(n) * F(n+1), where F(n) = A000045(n) (Fibonacci numbers).

Original entry on oeis.org

0, 1, 2, 6, 15, 40, 104, 273, 714, 1870, 4895, 12816, 33552, 87841, 229970, 602070, 1576239, 4126648, 10803704, 28284465, 74049690, 193864606, 507544127, 1328767776, 3478759200, 9107509825, 23843770274, 62423800998, 163427632719, 427859097160, 1120149658760
Offset: 0

Views

Author

Keywords

Comments

a(n)/A007598(n) ~= golden ratio, especially for larger n. - Robert Happelberg (roberthappelberg(AT)yahoo.com), Jul 25 2005
Let phi be the golden ratio (cf. A001622). Then 1/phi = phi - 1 = Sum_{n>=1} (-1)^(n-1)/a(n), an alternating infinite series consisting solely of unit fractions. - Franz Vrabec, Sep 14 2005
a(n+2) is the Hankel transform of A005807 aerated. - Paul Barry, Nov 04 2008
A more exact name would be: Golden convergents to rectangle numbers. These rectangles are not actually golden (ratio of sides is not phi) but are golden convergents (sides are numerator and denominator of convergents in the continued fraction expansion of phi, whence ratio of sides converges to phi). - Daniel Forgues, Nov 29 2009
The Kn4 sums (see A180662 for definition) of the "Races with Ties" triangle A035317 lead to this sequence. - Johannes W. Meijer, Jul 20 2011
Numbers m such that m(5m+2)+1 or m(5m-2)+1 is a square. - Bruno Berselli, Oct 22 2012
In pairs, these numbers are important in finding binomial coefficients that appear in at least six places in Pascal's triangle. For instance, the pair (m,n) = (40, 104) finds the numbers binomial(n-1,m) = binomial(n,m-1). Two additional numbers are found on the other side of the triangle. The final two numbers appear in row binomial(n-1,m). See A003015. - T. D. Noe, Mar 13 2013
For n>1, a(n) is one-half the area of the trapezoid created by the four points (F(n),L(n)), (L(n),F(n)), (F(n+1), L(n+1)), (L(n+1), F(n+1)) where F(n) = A000045(n) and L(n) = A000032(n). - J. M. Bergot, May 14 2014
[Note on how to calculate: take the two points (a,b) and (c,d) with a
a(n) = A067962(n-1) / A067962(n-2), n > 1. - Reinhard Zumkeller, Sep 24 2015
Can be obtained (up to signs) by setting x = F(n)/F(n+1) in g.f. for Fibonacci numbers - see Pongsriiam. - N. J. A. Sloane, Mar 23 2017

Examples

			G.f. = x + 2*x^2 + 6*x^3 + 15*x^4 + 40*x^5 + 104*x^6 + 273*x^7 + 714*x^8 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 9.
  • 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

Programs

  • Haskell
    a001654 n = a001654_list !! n
    a001654_list = zipWith (*) (tail a000045_list) a000045_list
    -- Reinhard Zumkeller, Jun 08 2013
    
  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else 2*Self(n-1) + 2*Self(n-2) - Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 17 2018
  • Maple
    with(combinat): A001654:=n->fibonacci(n)*fibonacci(n+1):
    seq(A001654(n), n=0..28); # Zerinvary Lajos, Oct 07 2007
  • Mathematica
    LinearRecurrence[{2,2,-1}, {0,1,2}, 100] (* Vladimir Joseph Stephan Orlovsky, Jul 03 2011 *)
    Times@@@Partition[Fibonacci[Range[0,30]],2,1] (* Harvey P. Dale, Aug 18 2011 *)
    Accumulate[Fibonacci[Range[0, 30]]^2] (* Paolo Xausa, May 31 2024 *)
  • PARI
    A001654(n)=fibonacci(n)*fibonacci(n+1);
    
  • PARI
    b(n, k)=prod(j=1, k, fibonacci(n+j)/fibonacci(j));
    vector(30, n, b(n-1, 2))  \\ Joerg Arndt, May 08 2016
    
  • Python
    from sympy import fibonacci as F
    def a(n): return F(n)*F(n + 1)
    [a(n) for n in range(101)] # Indranil Ghosh, Aug 03 2017
    
  • Python
    from math import prod
    from gmpy2 import fib2
    def A001654(n): return prod(fib2(n+1)) # Chai Wah Wu, May 19 2022
    

Formula

a(n) = A010048(n+1, 2) = Fibonomial(n+1, 2).
a(n) = A006498(2*n-1).
a(n) = a(n - 1) + A007598(n) = a(n - 1) + A000045(n)^2 = Sum_{j <= n} Fibonacci(j)^2. - Henry Bottomley, Feb 09 2001 [corrected by Ridouane Oudra, Apr 12 2025]
For n > 0, 1 - 1/a(n+1) = Sum_{k=1..n} 1/(F(k)*F(k+2)) where F(k) is the k-th Fibonacci number. - Benoit Cloitre, Aug 31 2002.
G.f.: x/(1-2*x-2*x^2+x^3) = x/((1+x)*(1-3*x+x^2)). (Simon Plouffe in his 1992 dissertation; see Comments to A055870),
a(n) = 3*a(n-1) - a(n-2) - (-1)^n = -a(-1-n).
Let M = the 3 X 3 matrix [1 2 1 / 1 1 0 / 1 0 0]; then a(n) = the center term in M^n *[1 0 0]. E.g., a(5) = 40 since M^5 * [1 0 0] = [64 40 25]. - Gary W. Adamson, Oct 10 2004
a(n) = Sum{k=0..n} Fibonacci(k)^2. The proof is easy. Start from a square (1*1). On the right side, draw another square (1*1). On the above side draw a square ((1+1)*(1+1)). On the left side, draw a square ((1+2)*(1+2)) and so on. You get a rectangle (F(n)*F(1+n)) which contains all the squares of side F(1), F(2), ..., F(n). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 19 2007
With phi = (1+sqrt(5))/2, a(n) = round((phi^(2*n+1))/5) = floor((1/2) + (phi^(2*n+1))/5), n >= 0. - Daniel Forgues, Nov 29 2009
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3), a(1)=1, a(2)=2, a(3)=6. - Sture Sjöstedt, Feb 06 2010
a(n) = (A002878(n) - (-1)^n)/5. - R. J. Mathar, Jul 22 2010
a(n) = 1/|F(n+1)/F(n) - F(n)/F(n-1)| where F(n) = Fibonacci numbers A000045. b(n) = F(n+1)/F(n) - F(n)/F(n-1): 1/1, -1/2, 1/6, -1/15, 1/40, -1/104, ...; c(n) = 1/b(n) = a(n)*(-1)^(n+1): 1, -2, 6, -15, 40, -104, ... (n=1,2,...). - Thomas Ordowski, Nov 04 2010
a(n) = (Fibonacci(n+2)^2 - Fibonacci(n-1)^2)/4. - Gary Detlefs, Dec 03 2010
Let d(n) = n mod 2, a(0)=0 and a(1)=1. For n > 1, a(n) = d(n) + 2*a(n-1) + Sum_{k=0..n-2} a(k). - L. Edson Jeffery, Mar 20 2011
From Tim Monahan, Jul 11 2011: (Start)
a(n+1) = ((2+sqrt(5))*((3+sqrt(5))/2)^n+(2-sqrt(5))*((3-sqrt(5))/2)^n+(-1)^n)/5.
a(n) = ((1+sqrt(5))*((3+sqrt(5))/2)^n+(1-sqrt(5))*((3-sqrt(5))/2)^n-2*(-1)^n)/10. (End)
From Wolfdieter Lang, Jul 21 2012: (Start)
a(n) = (2*A059840(n+2) - A027941(n))/3, n >= 0, with A059840(n+2) = Sum_{k=0..n} F(k)*F(k+2) and A027941(n) = A001519(n+1) - 1, n >= 0, where A001519(n+1) = F(2*n+1). (End)
a(n) = (-1)^n * Sum_{k=0..n} (-1)^k*F(2*k), n >= 0. - Wolfdieter Lang, Aug 11 2012
a(-1-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2014
0 = a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(-2*a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Sep 19 2014
a(n) = (L(2*n+1) - (-1)^n)/5 with L(k) = A000032(k). - J. M. Bergot, Apr 15 2016
E.g.f.: ((3 + sqrt(5))*exp((5+sqrt(5))*x/2) - 2*exp((2*x)/(3+sqrt(5))+x) - 1 - sqrt(5))*exp(-x)/(5*(1 + sqrt(5))). - Ilya Gutkovskiy, Apr 15 2016
From Klaus Purath, Apr 24 2019: (Start)
a(n) = A061646(n) - Fibonacci(n-1)^2.
a(n) = (A061646(n+1) - A061646(n))/2. (End)
a(n) = A226205(n+1) + (-1)^(n+1). - Flávio V. Fernandes, Apr 23 2020
Sum_{n>=1} 1/a(n) = A290565. - Amiram Eldar, Oct 06 2020
Product_{n>=2} (1 + (-1)^n/a(n)) = phi^2/2 (A239798). - Amiram Eldar, Dec 02 2024
G.f.: x * exp( Sum_{k>=1} F(3*k)/F(k) * x^k/k ), where F(n) = A000045(n). - Seiichi Manyama, May 07 2025

Extensions

Extended by Wolfdieter Lang, Jun 27 2000

A192744 Constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.

Original entry on oeis.org

1, 1, 3, 8, 29, 133, 762, 5215, 41257, 369032, 3676209, 40333241, 483094250, 6271446691, 87705811341, 1314473334832, 21017294666173, 357096406209005, 6424799978507178, 122024623087820183, 2439706330834135361, 51219771117454755544
Offset: 0

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

The titular polynomial is defined recursively by p(n,x)=x*p(n-1,x)+n! for n>0, where p(0,x)=1; see the Example. For an introduction to polynomial reduction, see A192232. The discussion at A192232 Comments continues here:
...
Let R(p,q,s) denote the "reduction of polynomial p by q->s" as defined at A192232. Suppose that q(x)=x^k for some k>0 and that s(x)=s(k,0)*x^(k-1)+s(k,1)*x^(k-2)+...+s(k,k-2)x+s(k,k-1).
...
First, we shall take p(x)=x^n, where n>=0; the results will be used to formulate R(p,q,s) for general p. Represent R(x^n,q,s) by
...
R(x^n)=s(n,0)*x^(k-1)+s(n,1)*x^(k-2)+...+s(n,k-2)*x+s(n,k-1).
...
Then each of the sequences u(n)=s(n,h), for h=0,1,...,k-1, satisfies this linear recurrence relation:
...
u(n)=s(k,0)*u(n-1)+s(k,1)*u(n-2)+...+s(k,k-2)*u(n-k-1)+s(k,k-1)*u(n-k), with initial values tabulated here:
...
n: ..s(n,0)...s(n,1)..s(n,2).......s(n,k-2)..s(n,k-1)
0: ....0........0.......0..............0.......1
1: ....0........0.......0..............1.......0
...
k-2: ..0........1.......0..............0.......0
k-1: ..0........0.......0..............0.......0
k: ..s(k,0)...s(k,1)..s(k,2).......s(k,k-2)..s(k,k-1)
...
That completes the formulation for p(x)=x^n. Turning to the general case, suppose that
...
p(n,x)=p(n,0)*x^n+p(n,1)*x^(n-1)+...+p(n,n-1)*x+p(n,n)
...
is a polynomial of degree n>=0. Then the reduction denoted by (R(p(n,x) by x^k -> s(x)) is the polynomial of degree k-1 given by the matrix product P*S*X, where P=(p(n,0)...p(n,1).........p(n-k)...p(n,n-k+1); X has all 0's except for main diagonal (x^(k-1), x^(k-2)...x,1); and S has
...
row 1: ... s(n,0) ... s(n,1) ...... s(n,k-2) . s(n,k-1)
row 2: ... s(n-1,0) . s(n-1,1) .... s(n-1,k-2) s(n-1,k-1)
...
row n-k+1: s(k,0).... s(k,1) ...... s(k,k-2) ..s(k,k-1)
row n-k+2: p(n,n-k+1) p(n,n-k+2) .. p(n,n-1) ..p(n,n)
*****
As a class of examples, suppose that (v(n)), for n>=0, is a sequence, that p(0,x)=1, and p(n,x)=v(n)+p(n-1,x) for n>0. If q(x)=x^2 and s(x)=x+1, and we write the reduction R(p(n,x)) as u1(n)*x+u2(n), then the sequences u1 and u2 are convolutions with the Fibonacci sequence, viz., let F=(0,1,1,2,3,5,8,...)=A000045 and let G=(1,0,1,1,2,3,5,8...); then u1=G**v and u2=F**v, where ** denotes convolution. Examples (with a few exceptions for initial terms):
...
If v(n)=n! then u1=A192744, u2=A192745.
If v(n)=n+1 then u1=A000071, u2=A001924.
If v(n)=2n then u1=A014739, u2=A027181.
If v(n)=2n+1 then u1=A001911, u2=A001891.
If v(n)=3n+1 then u1=A027961, u2=A023537.
If v(n)=3n+2 then u1=A192746, u2=A192747.
If v(n)=3n then u1=A154691, u2=A192748.
If v(n)=4n+1 then u1=A053311, u2=A192749.
If v(n)=4n+2 then u1=A192750, u2=A192751.
If v(n)=4n+3 then u1=A192752, u2=A192753.
If v(n)=4n then u1=A147728, u2=A023654.
If v(n)=5n+1 then u1=A192754, u2=A192755.
If v(n)=5n then u1=A166863, u2=A192756.
If v(n)=floor((n+1)tau) then u1=A192457, u2=A023611.
If v(n)=floor((n+2)/2) then u1=A052952, u2=A129696.
If v(n)=floor((n+3)/3) then u1=A004695, u2=A178982.
If v(n)=floor((n+4)/4) then u1=A080239, u2=A192758.
If v(n)=floor((n+5)/5) then u1=A124502, u2=A192759.
If v(n)=n+2 then u1=A001594, u2=A192760.
If v(n)=n+3 then u1=A022318, u2=A192761.
If v(n)=n+4 then u1=A022319, u2=A192762.
If v(n)=2^n then u1=A027934, u2=A008766.
If v(n)=3^n then u1=A106517, u2=A094688.

Examples

			The first five polynomials and their reductions:
1 -> 1
1+x -> 1+x
2+x+x^2 -> 3+2x
6+2x+x^2+x^3 -> 8+5x
24+6x+2x^2+x^3+x^4 -> 29+13x, so that
A192744=(1,1,3,8,29,...) and A192745=(0,1,2,5,13,...).
		

Crossrefs

Cf. A192232.

Programs

  • Maple
    A192744p := proc(n,x)
        option remember;
        if n = 0 then
            1;
        else
            x*procname(n-1,x)+n! ;
            expand(%) ;
        end if;
    end proc:
    A192744 := proc(n)
        local p;
        p := A192744p(n,x) ;
        while degree(p,x) > 1 do
            p := algsubs(x^2=x+1,p) ;
            p := expand(p) ;
        end do:
        coeftayl(p,x=0,0) ;
    end proc: # R. J. Mathar, Dec 16 2015
  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + n!;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A192744 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192745 *)

Formula

G.f.: (1-x)/(1-x-x^2)/Q(0), where Q(k)= 1 - x*(k+1)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 20 2013
Conjecture: a(n) +(-n-2)*a(n-1) +2*(n-1)*a(n-2) +3*a(n-3) +(-n+2)*a(n-4)=0. - R. J. Mathar, May 04 2014
Conjecture: (-n+2)*a(n) +(n^2-n-1)*a(n-1) +(-n^2+3*n-3)*a(n-2) -(n-1)^2*a(n-3)
=0. - R. J. Mathar, Dec 16 2015

A035317 Pascal-like triangle associated with A000670.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 2, 1, 4, 7, 6, 3, 1, 5, 11, 13, 9, 3, 1, 6, 16, 24, 22, 12, 4, 1, 7, 22, 40, 46, 34, 16, 4, 1, 8, 29, 62, 86, 80, 50, 20, 5, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 1, 11, 56, 174, 367, 553, 610, 496, 295, 125
Offset: 0

Keywords

Comments

From Johannes W. Meijer, Jul 20 2011: (Start)
The triangle sums, see A180662 for their definitions, link this "Races with Ties" triangle with several sequences, see the crossrefs. Observe that the Kn4 sums lead to the golden rectangle numbers A001654 and that the Fi1 and Fi2 sums lead to the Jacobsthal sequence A001045.
The series expansion of G(x, y) = 1/((y*x-1)*(y*x+1)*((y+1)*x-1)) as function of x leads to this sequence, see the second Maple program. (End)
T(2n,k) = the number of hatted frog arrangements with k frogs on the 2xn grid. See the linked paper "Frogs, hats and common subsequences". - Chris Cox, Apr 12 2024

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  2;
  1,  3,  4,   2;
  1,  4,  7,   6,   3;
  1,  5, 11,  13,   9,   3;
  1,  6, 16,  24,  22,  12,   4;
  1,  7, 22,  40,  46,  34,  16,   4;
  1,  8, 29,  62,  86,  80,  50,  20,  5;
  1,  9, 37,  91, 148, 166, 130,  70, 25,  5;
  1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6;
  ...
		

Crossrefs

Row sums are A000975, diagonal sums are A080239.
Central terms are A014300.
Similar to the triangles A059259, A080242, A108561, A112555.
Cf. A059260.
Triangle sums (see the comments): A000975 (Row1), A059841 (Row2), A080239 (Kn11), A052952 (Kn21), A129696 (Kn22), A001906 (Kn3), A001654 (Kn4), A001045 (Fi1, Fi2), A023435 (Ca2), Gi2 (A193146), A190525 (Ze2), A193147 (Ze3), A181532 (Ze4). - Johannes W. Meijer, Jul 20 2011
Cf. A181971.

Programs

  • Haskell
    a035317 n k = a035317_tabl !! n !! k
    a035317_row n = a035317_tabl !! n
    a035317_tabl = map snd $ iterate f (0, [1]) where
       f (i, row) = (1 - i, zipWith (+) ([0] ++ row) (row ++ [i]))
    -- Reinhard Zumkeller, Jul 09 2012
    
  • Maple
    A035317 := proc(n,k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
    A035317 := proc(n,k): coeff(coeftayl(1/((y*x-1)*(y*x+1)*((y+1)*x-1)), x=0, n), y, k) end: seq(seq(A035317(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Jul 20 2011
  • Mathematica
    t[n_, k_] := (-1)^k*(((-1)^k*(n+2)!*Hypergeometric2F1[1, n+3, k+2, -1])/((k+1)!*(n-k+1)!) + 2^(k-n-2)); Flatten[ Table[ t[n, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011, after Johannes W. Meijer *)
  • PARI
    {T(n,k)=if(n==k,(n+2)\2,if(k==0,1,if(n>k,T(n-1,k-1)+T(n-1,k))))}
    for(n=0,12,for(k=0,n,print1(T(n,k),","));print("")) \\ Paul D. Hanna, Jul 18 2012
    
  • Sage
    def A035317_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n+2, k) for k in (1..n)]
    for n in (1..11): print(A035317_row(n)) # Peter Luschny, Mar 16 2016

Formula

T(n,k) = Sum_{j=0..floor(n/2)} binomial(n-2j, k-2j). - Paul Barry, Feb 11 2003
From Johannes W. Meijer, Jul 20 2011: (Start)
T(n, k) = Sum_{i=0..k}((-1)^(i+k) * binomial(i+n-k+1,i)). (Mendelson)
T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = floor(n/2) + 1. (Mendelson)
Sum_{k = 0..n}((-1)^k * (n-k+1)^n * T(n, k)) = A000670(n). (Mendelson)
T(n, n-k) = A128176(n, k); T(n+k, n-k) = A158909(n, k); T(2*n-k, k) = A092879(n, k). (End)
T(2*n+1,n) = A014301(n+1); T(2*n+1,n+1) = A026641(n+1). - Reinhard Zumkeller, Jul 19 2012

Extensions

More terms from James Sellers

A104763 Triangle read by rows: Fibonacci(1), Fibonacci(2), ..., Fibonacci(n) in row n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 5, 1, 1, 2, 3, 5, 8, 1, 1, 2, 3, 5, 8, 13, 1, 1, 2, 3, 5, 8, 13, 21, 1, 1, 2, 3, 5, 8, 13, 21, 34, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233
Offset: 1

Author

Gary W. Adamson, Mar 23 2005

Keywords

Comments

Triangle of A104762, Fibonacci sequence in each row starts from the right.
The triangle or chess sums, see A180662 for their definitions, link the Fibonacci(n) triangle to sixteen different sequences, see the crossrefs. The knight sums Kn14 - Kn18 have been added. As could be expected all sums are related to the Fibonacci numbers. - Johannes W. Meijer, Sep 22 2010
Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. Sequence A104763 is reluctant sequence of Fibonacci numbers (A000045), except 0. - Boris Putievskiy, Dec 13 2012

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 3;
  1, 1, 2, 3, 5;
  1, 1, 2, 3, 5, 8;
  1, 1, 2, 3, 5, 8, 13; ...
		

Crossrefs

Cf. A000071 (row sums). - R. J. Mathar, Jul 22 2009
Triangle sums (see the comments): A000071 (Row1; Kn4 & Ca1 & Ca4 & Gi1 & Gi4); A008346 (Row2); A131524 (Kn11); A001911 (Kn12); A006327 (Kn13); A167616 (Kn14); A180671 (Kn15); A180672 (Kn16); A180673 (Kn17); A180674 (Kn18); A052952 (Kn21 & Kn22 & Kn23 & Fi2 & Ze2); A001906 (Kn3 &Fi1 & Ze3); A004695 (Ca2 & Ze4); A001076 (Ca3 & Ze1); A080239 (Gi2); A081016 (Gi3). - Johannes W. Meijer, Sep 22 2010

Programs

  • GAP
    Flat(List([1..15], n -> List([1..n], k -> Fibonacci(k)))); # G. C. Greubel, Jul 13 2019
  • Haskell
    a104763 n k = a104763_tabl !! (n-1) !! (k-1)
    a104763_row n = a104763_tabl !! (n-1)
    a104763_tabl = map (flip take $ tail a000045_list) [1..]
    -- Reinhard Zumkeller, Aug 15 2013
    
  • Magma
    [Fibonacci(k): k in [1..n], n in [1..15]]; // G. C. Greubel, Jul 13 2019
    
  • Mathematica
    Table[Fibonacci[k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jul 13 2019 *)
  • PARI
    for(n=1,15, for(k=1,n, print1(fibonacci(k), ", "))) \\ G. C. Greubel, Jul 13 2019
    
  • Sage
    [[fibonacci(k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Jul 13 2019
    

Formula

F(1) through F(n) starting from the left in n-th row.
T(n,k) = A000045(k), 1<=k<=n. - R. J. Mathar, May 02 2008
a(n) = A000045(m), where m= n-t(t+1)/2, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
G.f.: (x*y)/((x-1)*(x^2*y^2+x*y-1)). - Vladimir Kruchinin, Jun 21 2025

Extensions

Edited by R. J. Mathar, May 02 2008
Extended by R. J. Mathar, Aug 27 2008

A124502 a(1)=a(2)=1; thereafter, a(n+1) = a(n) + a(n-1) + 1 if n is a multiple of 5, otherwise a(n+1) = a(n) + a(n-1).

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 14, 23, 37, 60, 98, 158, 256, 414, 670, 1085, 1755, 2840, 4595, 7435, 12031, 19466, 31497, 50963, 82460, 133424, 215884, 349308, 565192, 914500, 1479693, 2394193, 3873886, 6268079, 10141965, 16410045, 26552010, 42962055, 69514065, 112476120
Offset: 1

Author

N. J. A. Sloane, May 25 2008

Keywords

Comments

If we split this sequence into 5 separate sequences of n mod 5, each individual sequence is of the form a(n) = 12*a(n-1) - 10*a(n-2) - a(n-3). For example, 12*98 - 10*9 - 1 = 1085. This is the same recurrence exhibited in A138134 and the n mod 5 =0 sequence...5, 60, 670, 7435 is A138134.

Examples

			a(6) = a(5) + a(4) + 1 = 5 + 3 + 1 = 9 because n=5 is a multiple of 5.
a(7) = a(6) + a(5) = 9 + 5 = 14 because n=6 is not a multiple of 5.
		

Crossrefs

Programs

  • Maple
    A124502:=proc(n) option remember; local t1; if n <= 2 then return 1; fi: if n mod 5 = 1 then t1:=1 else t1:=0; fi: procname(n-1)+procname(n-2)+t1; end proc; [seq(A124502(n), n=1..100)]; # N. J. A. Sloane, May 25 2008
  • Mathematica
    a=0; b=0; lst={a,b}; Do[z=a+b+1; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z,{n,4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 16 2010 *)
    nxt[{n_,a_,b_}]:={n+1,b,If[Divisible[n,5],a+b+1,a+b]}; NestList[nxt,{2,1,1},40][[All,2]] (* or *) LinearRecurrence[{1,1,0,0,1,-1,-1},{1,1,2,3,5,9,14},40] (* Harvey P. Dale, Jun 15 2017 *)

Formula

O.g.f.: x/((1-x)*(x^4 + x^3 + x^2 + x + 1)*(1 - x - x^2)). - R. J. Mathar, May 30 2008
a(n+5) = a(n) + Fibonacci(n+5), n>5.
a(n) = 12*a(n-5) - 10*a(n-10) - a(n-15). - Gary Detlefs, Dec 10 2010

Extensions

Typo in Maple code corrected by R. J. Mathar, May 30 2008
More specific name from R. J. Mathar, Dec 09 2009
Indices in definition corrected by N. J. A. Sloane, Nov 25 2010

A131132 a(n) = a(n-1) + a(n-2) + 1 if n is a multiple of 6, otherwise a(n) = a(n-1) + a(n-2).

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 22, 36, 58, 94, 152, 247, 399, 646, 1045, 1691, 2736, 4428, 7164, 11592, 18756, 30348, 49104, 79453, 128557, 208010, 336567, 544577, 881144, 1425722, 2306866, 3732588, 6039454, 9772042, 15811496, 25583539, 41395035, 66978574, 108373609
Offset: 0

Author

N. J. A. Sloane, May 25 2008

Keywords

Comments

Also: convolution of A000045 with the period-6 sequence (0,0,0,0,0,0, 1,...). - R. J. Mathar, May 30 2008
Sequences of the form s(0)=a, s(1)= b, s(n) = s(n-1) + s(n-2) + k if n mod m = p, else s(n) = s(n-1) + s(n-2) have a form s(n) = fibonacci(n-1)*a + fibonacci(n)*b + P(x)*k. a(n) is the P(x) sequence for m=6. s(n) = fib(n)*a + fib(n-1)*b + a(n-6-p)*k. - Gary Detlefs, Dec 05 2010
a(n) is the number of compositions of n where the order of the 2 and the 3 does not matter. - Gregory L. Simay, May 18 2017

Examples

			Since 5 is not a multiple of 6, a(5) = a(4) + a(3) = 5 + 3 = 8. Since 6 is a multiple of 6, a(6) = a(5) + a(4) + 1 = 8 + 5 + 1 = 14. - _Michael B. Porter_, Jul 26 2016
		

Crossrefs

Programs

  • Maple
    A131132:=proc(n) option remember; local t1; if n <= 2 then RETURN(1); fi: if n mod 6 = 1 then t1:=1 else t1:=0; fi: procname(n-1)+procname(n-2)+t1; end; [seq(A131132(n), n=1..100)]; # N. J. A. Sloane, May 25 2008; Typo corrected by R. J. Mathar, May 30 2008
  • Mathematica
    Print[Table[Round[(1 + Sqrt[5])/8 Fibonacci[n + 3]], {n, 0, 50}]] ;
    Print[RecurrenceTable[{c[n] == c[n - 1] + c[n - 2] + c[n - 6] - c[n - 7] - c[n - 8], c[0] == 1, c[1] == 1, c[2] == 2, c[3] == 3, c[4] == 5, c[5] == 8, c[6] == 14, c[7] == 22}, c, {n, 0, 50}]] ;  (* John M. Campbell, Jul 07 2016 *)
    LinearRecurrence[{1, 1, 0, 0, 0, 1, -1, -1}, {1, 1, 2, 3, 5, 8, 14, 22}, 40] (* Vincenzo Librandi, Jul 07 2016 *)

Formula

O.g.f.: 1/((1-x^6)(1 - x - x^2)). - R. J. Mathar, May 30 2008
a(n) = ((-1)^n-1)/6 + A099837(n+3)/12 + A000045(n+4)/4 + A057079(n)/12. - R. J. Mathar, Dec 07 2010
a(n) = floor(A066983(n+4)/3). - Gary Detlefs, Dec 19 2010
a(n) = round((1 + sqrt(5))/8 A000045(n+3)). - John M. Campbell, Jul 06 2016
a(n) = (number of compositions of n consisting of only 1 or 2 or 6) - (number of compositions with only 7 or ((1 or 2) and 7)) - (number of compositions with only 8 or ((1 or 2) and 8)). The "or" is inclusive. - Gregory L. Simay, May 25 2017

Extensions

More specific name from R. J. Mathar, Dec 09 2009

A192758 Coefficient of x in the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.

Original entry on oeis.org

0, 1, 2, 4, 7, 13, 22, 37, 61, 101, 165, 269, 437, 710, 1151, 1865, 3020, 4890, 7915, 12810, 20730, 33546, 54282, 87834, 142122, 229963, 372092, 602062, 974161, 1576231, 2550400, 4126639, 6677047, 10803695, 17480751, 28284455, 45765215
Offset: 1

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

The titular polynomial is defined recursively by p(n,x)=x*(n-1,x)+floor((n+4)/4) for n>0, where p(0,x)=1. For discussions of polynomial reduction, see A192232 and A192744.

Crossrefs

Programs

  • Mathematica
    q = x^2; s = x + 1; z = 40;
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + Floor[(n + 4)/4] /; n > 0;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A080239 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192758 *)

Formula

Conjecture: G.f.: -x^2 / ( (1+x)*(x^2+1)*(x^2+x-1)*(x-1)^2 ), partial sums of A080239. a(n)-a(n-2) = A097083(n-1). - R. J. Mathar, May 04 2014

A230448 T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = A226205(n+1), n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, 1, 3, 1, 2, 4, 5, 1, 3, 6, 9, 16, 1, 4, 9, 15, 25, 39, 1, 5, 13, 24, 40, 64, 105, 1, 6, 18, 37, 64, 104, 169, 272, 1, 7, 24, 55, 101, 168, 273, 441, 715, 1, 8, 31, 79, 156, 269, 441, 714, 1156, 1869, 1, 9, 39, 110, 235, 425, 710, 1155, 1870, 3025, 4896
Offset: 0

Author

Johannes W. Meijer, Oct 19 2013

Keywords

Comments

Triangle T(n, k) is related to the Kn1p sums of the ‘Races with Ties’ triangle A035317. See A230447 for the Kn1p sums and A180662 for the definitions of these sums.
The row sums equal ((-1)^n*3*A083581(n) + A022379(2*n+2))/15.
Note that the partial fraction expansion of the G.f. of the terms in the n-th row of the square array Tsq(n, k) = T(n+k, k) is related to A014334, the exponential convolution of the Fibonacci numbers with themselves, and to A000032, the Lucas numbers.

Examples

			The first few rows of triangle T(n, k), n >= 0 and 0 <= k <= n.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1
1|  1,  0
2|  1,  1,  3
3|  1,  2,  4,   5
4|  1,  3,  6,   9,  16
5|  1,  4,  9,  15,  25,   39
6|  1,  5, 13,  24,  40,   64,  105
7|  1,  6, 18,  37,  64,  104,  169,   272
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
n/k 0   1   2    3    4    5      6     7
------------------------------------------------
0|  1,  0,  3,   5,  16,  39,   105,  272
1|  1,  1,  4,   9,  25,  64,   169,  441
2|  1,  2,  6,  15,  40,  104,  273,  714
3|  1,  3,  9,  24,  64,  168,  441, 1155
4|  1,  4, 13,  37, 101,  269,  710, 1865
5|  1,  5, 18,  55, 156,  425, 1135, 3000
6|  1,  6, 24,  79, 235,  660, 1795, 4795
7|  1,  7, 31, 110, 345, 1005, 2800, 7595
		

Crossrefs

Programs

  • Maple
    T := proc(n, k) option remember: if k=0 then return(1) elif k=n then return(combinat[fibonacci](n+2)*combinat[fibonacci](n-1)) else procname(n-1, k-1) + procname(n-1, k) fi: end: seq(seq(T(n, k), k=0..n), n=0..10); # End first program.
    T := proc(n, k): add(A035317(n+k-p-2, p), p=0..k) end: A035317 := proc(n, k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(T(n, k), k=0..n), n=0..10); # End second program.

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = F(n+2) * F(n-1) = A226205(n+1) with F(n) = A000045(n), the Fibonacci numbers, n >= 0 and 0 <= k <= n.
T(n, k) = sum(A035317(n+k-p-2, p), p=0..k), n >= 0 and 0 <= k <= n.
T(n+p+2, p-2) = A080239(n+2*p-1) - sum(A035317(n-k+p-1, k+p-1), k=0..floor(n/2)), n >= 0 and p >= 2.
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
Tsq(n, k) = sum(Tsq(n-1, i), i=0..k), n >= 1 and k >= 0, with Tsq(0, k) = A226205(k+1).
The two G.f.’s given below generate the terms in the n-th row of the square array Tsq(n, k). The remarkable second G.f. is the partial fraction expansion of the first G.f..
G.f.: 1/((1-x)^(n-2)*(1+x)*(x^2-3*x+1)), n >= 0.
G.f.: sum((-1)^(n+k-1)*A014334(k+2)/(2^(k+2)*(x-1)^(n-k-2)), k=0..n-3) + 1/(5*2^(n-2)*(1+x)) + (A000032(n+1) - A000032(n-1)*x)/(5*(x^2-3*x+1)), n >= 0.

A260710 Expansion of 1/(1 - x - x^2 - x^4 + x^5 + x^7).

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 25, 43, 69, 116, 188, 313, 511, 846, 1386, 2288, 3756, 6191, 10174, 16756, 27552, 45357, 74604, 122787, 201996, 332414, 546901, 899946, 1480699, 2436459, 4008858, 6596366, 10853563, 17858788, 29384804, 48350401, 79555943, 130902711
Offset: 0

Author

David Neil McGrath, Jul 30 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts 1,2,3,4 where the order (position) of adjacent pairs of numbers (1,2);(2,3);(3,4) is unimportant. Alternatively the order of the complementary pairs (1,4);(1,3);(2,4) is important.

Examples

			There are 25 partially ordered partitions of 7, i.e., a(7) = 25. These are (43=34),(421=412),(124=214),(241),(142),(4111),(1411),(1141),(1114),(331),(313),(133),(1132=1123),(2131=1231),(1312=1321),(2311=3211),(31111),(13111),(11311),(11131),(11113),(2221=four),(22111=ten),(211111=six),(1111111).
		

Programs

  • Magma
    I:=[1,1,2,3,6,9,16]; [n le 7 select I[n] else Self(n-1)+Self(n-2)+Self(n-4)-Self(n-5)-Self(n-7): n in [1..40]]; // Vincenzo Librandi, Aug 04 2015
    
  • Mathematica
    LinearRecurrence[{1, 1, 0, 1, -1, 0, -1}, {1, 1, 2, 3, 6, 9, 16}, 50] (* Vincenzo Librandi, Aug 04 2015 *)
  • PARI
    Vec(1/(1 - x - x^2 - x^4 + x^5 + x^7) + O(x^50)) \\ Michel Marcus, Aug 06 2015

Formula

G.f: 1/(1 - x - x^2 - x^4 + x^5 + x^7).
a(n) = a(n-1) + a(n-2) + a(n-4) - a(n-5) - a(n-7).
Construct the matrix array T(n,j) = [A^*j]*[S^*(j-1)] where A=(1,1,0,1,-1,0,-1) and S=(0,1,0,...) (A063524). [* is convolution operation] Define S^*0=I with I=(1,0,...). a(n) = Sum_{j=1..n} T(n,j).
Showing 1-10 of 11 results. Next