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 31-40 of 64 results. Next

A056858 Triangle of number of rises in restricted growth strings (RGS) for the set partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 26, 14, 1, 1, 15, 71, 89, 26, 1, 1, 21, 161, 380, 267, 46, 1, 1, 28, 322, 1268, 1709, 732, 79, 1, 1, 36, 588, 3571, 8136, 6794, 1887, 133, 1, 1, 45, 1002, 8878, 31532, 44924, 24717, 4654, 221, 1, 1, 55, 1617, 20053, 104927, 234412, 221857, 84170, 11113, 364, 1
Offset: 1

Views

Author

Winston C. Yang (winston(AT)cs.wisc.edu), Aug 31 2000

Keywords

Comments

Number of rises s_{i+1} > s_i in the RGS [s_1, ..., s_n] for a set partition of {1, ..., n}, where s_i is the index of the subset containing i, s_1 = 1 and s_i <= 1 + max_{j

Examples

			For example [1, 2, 1, 2, 2, 3] is the RGS for a set partition of {1, 2, 3, 4, 5, 6} and has 3 rises, at i = 1, i = 3 and i = 5.
1;
1,1;
1,3,1;
1,6,7,1;
1,10,26,14,1;
1,15,71,89,26,1;
1,21,161,380,267,46,1;
1,28,322,1268,1709,732,79,1;
1,36,588,3571,8136,6794,1887,133,1;
1,45,1002,8878,31532,44924,24717,4654,221,1;
1,55,1617,20053,104927,234412,221857,84170,11113,364,1;
1,66,2497,41965,310255,1025377,1528351,1006028,272557,25903,596,1;
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [apparently unpublished, Joerg Arndt, Mar 05 2016]

Crossrefs

Cf. A000110 (row sums).
Column 1 is triangular numbers (A000217); diagonal T(n, n-1) appears to be A001924.

Programs

  • Maple
    b:= proc(n, i, m) option remember; expand(
          `if`(n=0, x, add(b(n-1, j, max(m, j))*
          `if`(j>i, x, 1), j=1..m+1)))
        end:
    T:= n->(p-> seq(coeff(p, x, i), i=1..n))(b(n, 1, 0)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Mar 24 2016
  • Mathematica
    b[n_, i_, m_] := b[n, i, m] = Expand[If[n == 0, x, Sum[b[n - 1, j, Max[m, j]]*If[j > i, x, 1], {j, 1, m + 1}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, 1, 0]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, May 23 2016, after Alois P. Heinz *)

Extensions

More terms from Franklin T. Adams-Watters, Jun 08 2006
Clarified definition and edited comment and example, Joerg Arndt, Mar 05 2016

A064551 Ado [Simone Caramel]'s function: a(0) = 1, a(n) = a(n-1) + 2*(Fibonacci(n+1)-n), n > 0.

Original entry on oeis.org

1, 1, 1, 1, 3, 9, 23, 51, 103, 195, 353, 619, 1061, 1789, 2981, 4925, 8087, 13221, 21547, 35039, 56891, 92271, 149541, 242231, 392233, 634969, 1027753, 1663321, 2691723, 4355745, 7048223, 11404779, 18453871, 29859579, 48314441, 78175075, 126490637, 204666901, 331158797
Offset: 0

Author

Roger L. Bagula, Oct 08 2001

Keywords

Comments

A Pickover sequence with properties analogous to the primes.

References

  • Ado [Simone Caramel], Postings in egroups and newsgroups.

Crossrefs

Programs

  • ARIBAS
    function a064551(maxarg: integer); var n,r,rm,q,qm1,qm2: integer; begin qm2 := 0; qm1 := 0; rm := 0; for n := 0 to maxarg do if n < 2 then q := 1; else q := qm1 + qm2; end; qm2 := qm1; qm1 := q; if n = 0 then r := 1; else r := rm + 2*(q - n); end; rm := r; write(r," "); end; end; a064551(35);
    
  • Haskell
    a064551 n = a064551_list !! n
    a064551_list = 1 : zipWith (+) a064551_list
                       (map (* 2) $ zipWith (-) (drop 2 a000045_list) [1..])
    -- Reinhard Zumkeller, Sep 13 2013
  • Maple
    a:= proc(n) option remember: a(n-1)+2*(combinat[fibonacci](n+1)-n) end: a(0):=1: for n from 0 to 60 do printf(`%d, `, a(n)) od:
  • Mathematica
    a[0] = f[0] = f[1] = 1; f[n_] := f[n] = f[n - 1] + f[n - 2]; a[n_] := a[n] = a[n - 1] + 2*(f[n] - n); Table[ a[n], {n, 0, 40} ]
    LinearRecurrence[{4,-5,1,2,-1},{1,1,1,1,3},50] (* Harvey P. Dale, Sep 27 2011 *)

Formula

From T. D. Noe, Oct 12 2007: (Start)
G.f.: (1 - 3x + 2x^2 + x^3 + x^4)/((x-1)^3 (x^2 + x - 1)).
a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5). (End)
a(n) = (1/5)*2^(-n)*(-15*2^n + (10-4*sqrt(5))*(1-sqrt(5))^n + (1+sqrt(5))^n*(10+4*sqrt(5))) - n - n^2. - Jean-François Alcover, May 28 2013
a(n) = a(n-1) - 2 * A065220(n), n > 0. - Reinhard Zumkeller, Sep 13 2013
a(n) = 2*F(n+3) - n^2 - n - 3 = 1 + 2*Sum_{k=1..n} F(k+1) - k = 1 + 2*Sum_{k=1..n} A001924(k-3), F=A000045. - Ehren Metcalfe, Dec 27 2018
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(3 + x*(2 + x)). - Stefano Spezia, Oct 16 2023

A119407 Number of nonempty subsets of {1,2,...,n} with no gap of length greater than 4 (a set S has a gap of length d if a and b are in S but no x with a < x < b is in S, where b-a=d).

Original entry on oeis.org

1, 3, 7, 15, 31, 62, 122, 238, 462, 894, 1727, 3333, 6429, 12397, 23901, 46076, 88820, 171212, 330028, 636156, 1226237, 2363655, 4556099, 8782171, 16928187, 32630138, 62896622, 121237146, 233692122, 450456058, 868281979, 1673667337, 3226097529, 6218502937, 11986549817, 23104817656
Offset: 1

Author

John W. Layman, Jul 25 2006

Keywords

Comments

The numbers of subsets of {1,2,...,n} with no gap of length greater than d, for d=1,2 and 3, seem to be given in A000217, A001924 and A062544, respectively.

Examples

			G.f. = x + 3*x^2 + 7*x^3 + 15*x^4 + 31*x^5 + 62*x^6 + 122*x^7 + 238*x^8 + 462*x^9 + ...
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x/((1-x)*(1-2*x+x^5)) )); // G. C. Greubel, Jun 05 2019
    
  • Mathematica
    Rest@CoefficientList[Series[x/((1-x)*(1-2*x+x^5)), {x, 0, 40}], x] (* G. C. Greubel, Jun 05 2019 *)
    LinearRecurrence[{3,-2,0,0,-1,1},{1,3,7,15,31,62},40] (* Harvey P. Dale, Dec 04 2019 *)
  • PARI
    {a(n) = if( n<0, n = -n; polcoeff( x^5 / ((1 - x)^2 * (1 + x + x^2 + x^3 - x^4)) + x * O(x^n), n), polcoeff( x / ((1 - x)^2 * (1 - x - x^2 - x^3 - x^4)) + x * O(x^n), n))} /* Michael Somos, Dec 28 2012 */
    
  • PARI
    my(x='x+O('x^40)); Vec(x/((1-x)*(1-2*x+x^5))) \\ G. C. Greubel, Jun 05 2019
    
  • Sage
    a=(x/((1-x)*(1-2*x+x^5))).series(x, 40).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jun 05 2019

Formula

G.f. for number of nonempty subsets of {1,2,...,n} with no gap of length greater than d is x/((1-x)*(1-2*x+x^(d+1))). - Vladeta Jovovic, Apr 27 2008
From Michael Somos, Dec 28 2012: (Start)
G.f.: x/((1-x)^2*(1-x-x^2-x^3-x^4)) = x/((1-x)*(1-2*x+x^5)).
First difference is A107066. (End)
a(n-3) = Sum_{k=0..n} (n-k)*A000078(k) for n>3. - Greg Dresden, Jan 01 2021

Extensions

Terms a(25) onward added by G. C. Greubel, Jun 05 2019

A192755 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, 7, 19, 42, 82, 150, 263, 449, 753, 1248, 2052, 3356, 5469, 8891, 14431, 23398, 37910, 61394, 99395, 160885, 260381, 421372, 681864, 1103352, 1785337, 2888815, 4674283, 7563234, 12237658, 19801038, 32038847, 51840041, 83879049
Offset: 0

Author

Clark Kimberling, Jul 09 2011

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    p[0, n_] := 1; p[n_, x_] := x*p[n - 1, x] + 5 n + 1;
    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}]
      (* A192754 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A192755 *)

Formula

From R. J. Mathar, May 04 2014: (Start)
Conjecture: G.f.: -x*(1+4*x) / ( (x^2+x-1)*(x-1)^2 ).
a(n) = A001924(n)+4*A001924(n-1).
Partial sums of A192754. (End)

A210673 a(n) = a(n-1)+a(n-2)+n-4, a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, -1, -1, -2, -2, -2, -1, 1, 5, 12, 24, 44, 77, 131, 219, 362, 594, 970, 1579, 2565, 4161, 6744, 10924, 17688, 28633, 46343, 74999, 121366, 196390, 317782, 514199, 832009, 1346237, 2178276, 3524544, 5702852, 9227429, 14930315, 24157779, 39088130, 63245946
Offset: 0

Author

Alex Ratushnyak, May 09 2012

Keywords

Comments

Second differences are Fibonacci numbers A000045 with offset -4. - Olivier Gérard, Aug 21 2016

Crossrefs

Cf. A066982: a(n)=a(n-1)+a(n-2)+n-2, a(0)=0, a(1)=1 (except the first term).
Cf. A104161: a(n)=a(n-1)+a(n-2)+n-1, a(0)=0, a(1)=1.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n, a(0)=0, a(1)=1.
Cf. A192760: a(n)=a(n-1)+a(n-2)+n+1, a(0)=0, a(1)=1.
Cf. A192761: a(n)=a(n-1)+a(n-2)+n+2, a(0)=0, a(1)=1.
Cf. A192762: a(n)=a(n-1)+a(n-2)+n+3, a(0)=0, a(1)=1.
Cf. A210675: a(n)=a(n-1)+a(n-2)+n+4, a(0)=0, a(1)=1.

Programs

  • Mathematica
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==a[n-1]+a[n-2]+n-4},a,{n,50}] (* or *) LinearRecurrence[{3,-2,-1,1},{0,1,-1,-1},50] (* Harvey P. Dale, Oct 03 2012 *)

Formula

a(0)=0, a(1)=1, a(2)=-1, a(3)=-1, a(n) = 3*a(n-1)-2*a(n-2)-a(n-3)+a(n-4). - Harvey P. Dale, Oct 03 2012
G.f.: x/Q(0), where Q(k)= 1 + (k+1)*x/(1 - x - x*(1-x)/(x + (k+1)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 24 2013
G.f.: -x*(2*x-1)^2 / ((x-1)^2*(x^2+x-1)). - Colin Barker, May 31 2013

A210730 a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=a(1)=0.

Original entry on oeis.org

0, 0, 4, 9, 19, 35, 62, 106, 178, 295, 485, 793, 1292, 2100, 3408, 5525, 8951, 14495, 23466, 37982, 61470, 99475, 160969, 260469, 421464, 681960, 1103452, 1785441, 2888923, 4674395, 7563350, 12237778, 19801162, 32038975, 51840173, 83879185, 135719396
Offset: 0

Author

Alex Ratushnyak, May 10 2012

Keywords

Comments

Deleting the 0's leaves row 4 of the convolution array A213579. - Clark Kimberling, Jun 20 2012

Crossrefs

Cf. A033818: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=0 (except first 2 terms and sign).
Cf. A002062: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=0 (except the first term and sign).
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-3, a(0)=a(1)=0.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=0 (except the first term).
Cf. A023548: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=0 (except first 2 terms).
Cf. A023552: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=0 (except first 2 terms).
Cf. A210731: a(n)=a(n-1)+a(n-2)+n+3, a(0)=a(1)=0.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+3*F(n+1)-n-5); # G. C. Greubel, Jul 08 2019
  • Magma
    I:=[0, 0, 4, 9]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-Self(n-3)+Self(n-4): n in [1..37]]; // Bruno Berselli, May 10 2012
    
  • Magma
    F:=Fibonacci; [F(n+3)+3*F(n+1)-n-5: n in [0..40]]; // G. C. Greubel, Jul 08 2019
    
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==0, a[n]==a[n-1] +a[n-2] +n+2}, a, {n, 40}] (* Bruno Berselli, May 10 2012 *)
    LinearRecurrence[{3,-2,-1,1},{0,0,4,9},40] (* Harvey P. Dale, Jul 24 2013 *)
    With[{F=Fibonacci}, Table[F[n+3]+2*F[n+1]-n-5, {n, 40}]] (* G. C. Greubel, Jul 08 2019 *)
  • PARI
    concat(vector(2), Vec(x^2*(4-3*x)/((1-x)^2*(1-x-x^2)) + O(x^50))) \\ Colin Barker, Mar 11 2017
    
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+3*f(n+1)-n-5) \\ G. C. Greubel, Jul 08 2019
    
  • Sage
    f=fibonacci; [f(n+3)+3*f(n+1)-n-5 for n in (0..40)] # G. C. Greubel, Jul 08 2019
    

Formula

G.f.: x^2*(4-3*x)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, May 10 2012
a(n) = A210677(n)-1. - Bruno Berselli, May 10 2012
a(0)=0, a(1)=0, a(2)=4, a(3)=9, a(n) = 3*a(n-1)-2*a(n-2)-a(n-3)+a(n-4). - Harvey P. Dale, Jul 24 2013
a(n) = -5 + (2^(-1-n)*((1-sqrt(5))^n*(-7+5*sqrt(5)) + (1+sqrt(5))^n*(7+5*sqrt(5)))) / sqrt(5) - n. - Colin Barker, Mar 11 2017
a(n) = Fibonacci(n+3) + 3*Fibonacci(n+1) - n - 5. - G. C. Greubel, Jul 08 2019

A210731 a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 5, 11, 23, 42, 74, 126, 211, 349, 573, 936, 1524, 2476, 4017, 6511, 10547, 17078, 27646, 44746, 72415, 117185, 189625, 306836, 496488, 803352, 1299869, 2103251, 3403151, 5506434, 8909618, 14416086, 23325739, 37741861, 61067637, 98809536
Offset: 0

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A033818: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=0 (except first 2 terms and sign).
Cf. A002062: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=0 (except the first term and sign).
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-3, a(0)=a(1)=0.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=0 (except the first term).
Cf. A023548: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=0 (except first 2 terms).
Cf. A023552: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=0 (except first 2 terms).
Cf. A210730: a(n)=a(n-1)+a(n-2)+n+2, a(0)=a(1)=0.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+4*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
  • Magma
    F:=Fibonacci; [F(n+3)+4*F(n+1)-n-6: n in [0..40]]; // G. C. Greubel, Jul 09 2019
    
  • Mathematica
    With[{F = Fibonacci}, Table[F[n+3]+4*F[n+1]-n-6, {n,0,40}]] (* G. C. Greubel, Jul 09 2019 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+4}; NestList[nxt,{1,0,0},40][[;;,2]] (* or *) LinearRecurrence[{3,-2,-1,1},{0,0,5,11},40] (* Harvey P. Dale, Dec 30 2024 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+4*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
    
  • Sage
    f=fibonacci; [f(n+3)+4*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

From Colin Barker, Jun 29 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x^2*(5-4*x)/((1-x)^2*(1-x-x^2)). (End)
a(n) = Fibonacci(n+3) + 4*Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019

A248944 T(n,k)=Number of length n arrays x(i), i=1..n with x(i) in i..i+k and no value appearing more than 1 time.

Original entry on oeis.org

2, 3, 3, 4, 7, 4, 5, 13, 14, 5, 6, 21, 36, 26, 6, 7, 31, 76, 90, 46, 7, 8, 43, 140, 246, 212, 79, 8, 9, 57, 234, 566, 738, 478, 133, 9, 10, 73, 364, 1146, 2104, 2108, 1044, 221, 10, 11, 91, 536, 2106, 5150, 7364, 5794, 2227, 364, 11, 12, 111, 756, 3590, 11196, 21652, 24720
Offset: 1

Author

R. H. Hardin, Oct 17 2014

Keywords

Comments

Table starts
..2...3....4......5......6.......7........8........9........10........11
..3...7...13.....21.....31......43.......57.......73........91.......111
..4..14...36.....76....140.....234......364......536.......756......1030
..5..26...90....246....566....1146.....2106.....3590......5766......8826
..6..46..212....738...2104....5150....11196....22162.....40688.....70254
..7..79..478...2108...7364...21652....55532...127604....268108....523244
..8.133.1044...5794..24720...86608...260720...693552...1666000...3675680
..9.221.2227..15458..80196..334072..1173240..3598120...9856552..24553080
.10.364.4664..40296.253072.1249768..5112544.17990600..56010096.157175032
.11.596.9627.103129.780902.4557284.21670160.87396728.308055528.971055240

Crossrefs

Column 1 is A000027(n+1)
Column 2 is A001924(n+1)
Column 3 is A079922
Column 4 is A079923
Column 5 is A079924
Column 6 is A079925
Column 7 is A079926
Row 1 is A000027(n+1)
Row 2 is A002061(n+1)
Row 3 is A061989(n+3)
Row 4 is A079909
Row 5 is A079910
Row 6 is A079911
Row 7 is A079912

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) -a(n-2)
k=2: a(n) = 3*a(n-1) -2*a(n-2) -a(n-3) +a(n-4)
k=3: a(n) = 4*a(n-1) -4*a(n-2) -2*a(n-4) +4*a(n-5) -a(n-8)
k=4: [order 16]
k=5: [order 32]
k=6: [order 63]
Empirical for row n:
n=1: a(n) = n + 1
n=2: a(n) = n^2 + n + 1
n=3: a(n) = n^3 + 3*n
n=4: a(n) = n^4 - 2*n^3 + 9*n^2 - 8*n + 6 for n>1
n=5: a(n) = n^5 - 5*n^4 + 25*n^3 - 55*n^2 + 80*n - 46 for n>1
n=6: a(n) = n^6 - 9*n^5 + 60*n^4 - 225*n^3 + 555*n^2 - 774*n + 484 for n>3
n=7: a(n) = n^7 - 14*n^6 + 126*n^5 - 700*n^4 + 2625*n^3 - 6342*n^2 + 9072*n - 5840 for n>4

A345123 Number T(n,k) of ordered subsequences of {1,...,n} containing at least k elements and such that the first differences contain only odd numbers; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 7, 6, 3, 1, 12, 11, 7, 3, 1, 20, 19, 14, 8, 3, 1, 33, 32, 26, 17, 9, 3, 1, 54, 53, 46, 34, 20, 10, 3, 1, 88, 87, 79, 63, 43, 23, 11, 3, 1, 143, 142, 133, 113, 83, 53, 26, 12, 3, 1, 232, 231, 221, 196, 156, 106, 64, 29, 13, 3, 1, 376, 375, 364, 334, 279, 209, 132, 76, 32, 14, 3, 1
Offset: 0

Author

Alois P. Heinz, Jun 08 2021

Keywords

Comments

The sequence of column k satisfies a linear recurrence with constant coefficients of order 2k if k >= 2 and of order 3 for k in {0, 1}.

Examples

			T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,2) = 1: [1,2].
T(3,1) = 6: [1], [2], [3], [1,2], [2,3], [1,2,3].
T(4,0) = 12: [], [1], [2], [3], [4], [1,2], [1,4], [2,3], [3,4], [1,2,3], [2,3,4], [1,2,3,4].
T(6,3) = 17: [1,2,3], [1,2,5], [1,4,5], [2,3,4], [2,3,6], [2,5,6], [3,4,5], [4,5,6], [1,2,3,4], [1,2,3,6], [1,2,5,6], [1,4,5,6], [2,3,4,5], [3,4,5,6], [1,2,3,4,5], [2,3,4,5,6], [1,2,3,4,5,6].
Triangle T(n,k) begins:
    1;
    2,   1;
    4,   3,   1;
    7,   6,   3,   1;
   12,  11,   7,   3,   1;
   20,  19,  14,   8,   3,   1;
   33,  32,  26,  17,   9,   3,  1;
   54,  53,  46,  34,  20,  10,  3,  1;
   88,  87,  79,  63,  43,  23, 11,  3,  1;
  143, 142, 133, 113,  83,  53, 26, 12,  3, 1;
  232, 231, 221, 196, 156, 106, 64, 29, 13, 3, 1;
  ...
		

References

  • Chu, Hung Viet, Various Sequences from Counting Subsets, Fib. Quart., 59:2 (May 2021), 150-157.

Crossrefs

Columns k=0-3 give: A000071(n+3), A001911, A001924(n-1), A344004.
T(2n,n) give A340766.

Programs

  • Maple
    b:= proc(n, l, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(0
          in [l, irem(1+l-n, 2)], b(n-1, n, max(0, t-1)), 0)+b(n-1, l, t))
        end:
    T:= (n, k)-> b(n, 0, k):
    seq(seq(T(n, k), k=0..n), n=0..10);
    # second Maple program:
    g:= proc(n, k) option remember; `if`(k>n, 0,
         `if`(k in [0, 1], n^k, g(n-1, k-1)+g(n-2, k)))
        end:
    T:= proc(n, k) option remember;
         `if`(k>n, 0, g(n, k)+T(n, k+1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);
    # third Maple program:
    T:= proc(n, k) option remember; `if`(k>n, 0, binomial(iquo(n+k, 2), k)+
          `if`(k>0, binomial(iquo(n+k-1, 2), k), 0)+T(n, k+1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k > n, 0, Binomial[Quotient[n+k, 2], k] +
         If[k > 0, Binomial[Quotient[n+k-1, 2], k], 0] + T[n, k+1]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 11}] // Flatten (* Jean-François Alcover, Nov 06 2021, after 3rd Maple program *)

A077880 Expansion of (1-x)^(-1)/(1-2*x^2+x^3).

Original entry on oeis.org

1, 1, 3, 2, 6, 2, 11, -1, 21, -12, 44, -44, 101, -131, 247, -362, 626, -970, 1615, -2565, 4201, -6744, 10968, -17688, 28681, -46343, 75051, -121366, 196446, -317782, 514259, -832009, 1346301, -2178276, 3524612, -5702852, 9227501, -14930315, 24157855, -39088130, 63246026, -102334114
Offset: 0

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Examples

			1 + x + 3*x^2 + 2*x^3 + 6*x^4 + 2*x^5 + 11*x^6 - x^7 + 21*x^8 - 12*x^9 + 44*x^10 + ...
		

Crossrefs

Cf. A000045.

Programs

Formula

a(n) = (-1)^n*Fibonacci(n-1) + n. - Vladeta Jovovic, Jul 18 2004
a(n) = A001924(-3-n) = 2*a(n-2) - a(n-3) + 1. - Michael Somos, Dec 31 2012
If 0 is prepended then BINOMIAL transform is A079282 with 0 prepended. - Michael Somos, Dec 31 2012
a(n) = (-1)^n * Sum_{k=0..n} binomial(k-2,n-k). - Seiichi Manyama, Aug 14 2024
Previous Showing 31-40 of 64 results. Next