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.

A137361 a(n) = Sum_{k=0..n/2} k*binomial(n-2*k, 3*k+2).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 6, 21, 56, 126, 254, 480, 882, 1617, 2992, 5580, 10410, 19292, 35400, 64343, 116128, 208701, 374226, 670095, 1198164, 2138423, 3808148, 6766089, 11996042, 21229790, 37513896, 66202347, 116692472, 205458357, 361349662, 634845141, 1114205988
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Magma
    [&+[k*Binomial(n-2*k, 3*k+2): k in [0..(n div 2)]]: n in [0..40]]; // Bruno Berselli, Feb 13 2015
  • Maple
    a:= n-> (Matrix(10, (i,j)-> if i=j-1 then 1 elif j=1 then [6, -15, 20, -15, 8, -7, 6, -2, 0, -1][i] else 0 fi)^n)[1,8]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Oct 23 2008
  • Mathematica
    t[i_, j_] := If[i == j-1, 1, If[j == 1, {6, -15, 20, -15, 8, -7, 6, -2, 0, -1}[[i]] , 0]]; M = Array[t, {10, 10}]; a[n_] := MatrixPower[M, n][[1, 8]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)

Formula

G.f.: x^7/(x^5 + x^3 - 3*x^2 + 3*x - 1)^2. - Alois P. Heinz, Oct 23 2008

A137357 a(n) = Sum_{k <= n/2 } binomial(n-2k, 3k+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 12, 23, 44, 80, 138, 230, 379, 629, 1060, 1810, 3109, 5336, 9120, 15521, 26349, 44713, 75949, 129177, 219918, 374521, 637699, 1085401, 1846804, 3141826, 5344988, 9093989, 15474230, 26332515, 44810670, 76253683, 129755543, 220790480
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -3, 1, 0, 1}, Range[0, 4], 50] (* Paolo Xausa, Mar 17 2024 *)

Formula

G.f.: x*(x-1) / (x^5+x^3-3*x^2+3*x-1). - Colin Barker, Jan 23 2013

A136444 a(n) = Sum_{k=0..n} k*binomial(n-k, 2*k).

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 12, 25, 51, 101, 197, 381, 731, 1392, 2634, 4958, 9290, 17337, 32239, 59760, 110460, 203651, 374593, 687567, 1259597, 2303449, 4205493, 7666560, 13956532, 25374108, 46076436, 83575025, 151431099, 274108826, 495708364, 895670733, 1617003823, 2916984121
Offset: 0

Views

Author

Don Knuth, Apr 04 2008

Keywords

Comments

Consider four related sequences: A_n = sum C(n-k, 2*k), B_n = sum C(n-k, 2*k+1), A^*_n = sum k*C(n-k, 2*k), B^*_n = sum k*C(n-k, 2*k+1).
Sequence A_n, with generating function (1-z)/p(z) where p(z) = 1 - 2*z + z^2 - z^3, is A005251.
Sequence B_n, with generating function z/p(z), is A005314.
Sequence A^*_n is the present sequence.
Sequence B^*_n is A118430, but shifted one place so that the generating function is z^4/p(z)^2 instead of z^3/p(z)^2.
These sequences have many interrelations; for example,
B_{n+1} - B_n = A_n; B^*_{n+1} - B^*_n = A^*_n;
A_{n+1} - A_n = B_{n-1}; A^*{n+1} - A^*_n = B^*{n-1} + B_{n-1}.

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Magma
    [&+[k*Binomial(n-k, 2*k): k in [0..n]]: n in [0..40]]; // Bruno Berselli, Feb 13 2015
  • Maple
    a:= n-> (Matrix([[0,0,1,1,-3,-5]]). Matrix(6, (i,j)-> if (i=j-1) then 1 elif j=1 then [4,-6,6,-5,2,-1][i] else 0 fi)^n)[1,1]: seq(a(n), n=0..37);  # Alois P. Heinz, Aug 13 2008
  • Mathematica
    a[n_] := ({0, 0, 1, 1, -3, -5} . MatrixPower[ Table[If[i == j-1, 1, If[j == 1, {4, -6, 6, -5, 2, -1}[[i]], 0]], {i, 6}, {j, 6}], n])[[1]]; Table[a[n], {n, 0, 37}] (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)
    CoefficientList[Series[x^3 (1 - x)/(1 - 2 x + x^2 - x^3)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 15 2015 *)

Formula

G.f.: x^3*(1-x)/(1-2*x+x^2-x^3)^2.
a(n) ~ c * d^n * n, where d = A109134 = 1.75487766624669276... is the root of the equation d*(d-1)^2 = 1, c = 0.072838349685011... is the root of the equation 529*c^3 - 207*c^2 + 26*c = 1. - Vaclav Kotesovec, May 25 2015

A137358 a(n) = Sum_{k <= n/2 } binomial(n-2k, 3k+2).

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 15, 22, 34, 57, 101, 181, 319, 549, 928, 1557, 2617, 4427, 7536, 12872, 21992, 37513, 63862, 108575, 184524, 313701, 533619, 908140, 1545839, 2631240, 4478044, 7619870, 12964858, 22058847, 37533077, 63865592, 108676262, 184929945, 314685488
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[n-2k,3k+2],{k,0,Floor[n/2]}],{n,0,50}] (* or *) LinearRecurrence[{3,-3,1,0,1},{0,0,1,3,6},50] (* Harvey P. Dale, Nov 06 2012 *)

Formula

a(0)=0, a(1)=0, a(2)=1, a(3)=3, a(4)=6, a(n)=3*a(n-1)-3*a(n-2)+ a(n-3)+ a(n-5). - Harvey P. Dale, Nov 06 2012
G.f.: -x^2/(x^5+x^3-3*x^2+3*x-1). - Colin Barker, Jan 23 2013

A137359 a(n) = Sum_{k <= n/2 } k*binomial(n-2k, 3k).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 4, 10, 20, 35, 58, 98, 176, 333, 640, 1213, 2242, 4052, 7226, 12835, 22842, 40788, 72952, 130344, 232200, 412190, 729466, 1288216, 2272012, 4003795, 7050358, 12404345, 21801674, 38275760, 67125420, 117604174, 205865368, 360090917, 629414866
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([[10, 4, 1, 0$7]]). Matrix (10, (i,j)-> if i=j-1 then 1 elif j=1 then [6, -15, 20, -15, 8, -7, 6, -2, 0, -1][i] else 0 fi)^n)[1,8]: seq (a(n), n=0..50); # Alois P. Heinz, Oct 23 2008
  • Mathematica
    LinearRecurrence[{6, -15, 20, -15, 8, -7, 6, -2, 0, -1}, {0, 0, 0, 0, 0, 1, 4, 10, 20, 35}, 50] (* Paolo Xausa, Mar 17 2024 *)

Formula

G.f.: x^5*(1-x)^2/(x^5+x^3-3*x^2+3*x-1)^2. - Alois P. Heinz, Oct 23 2008

A137360 a(n) = Sum_{k <= n/2 } k*binomial(n-2k, 3k+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 5, 15, 35, 70, 128, 226, 402, 735, 1375, 2588, 4830, 8882, 16108, 28943, 51785, 92573, 165525, 295869, 528069, 940259, 1669725, 2957941, 5229953, 9233748, 16284106, 28688451, 50490125, 88765885, 155891305, 273495479, 479360847, 839451764
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([[35, 15, 5, 1, 0$6]]). Matrix (10, (i,j)-> if i=j-1 then 1 elif j=1 then [6, -15, 20, -15, 8, -7, 6, -2, 0, -1][i] else 0 fi)^n)[1,10]: seq (a(n), n=0..50);  # Alois P. Heinz, Oct 23 2008
  • Mathematica
    Table[Sum[k Binomial[n-2k,3k+1],{k,n/2}],{n,0,40}] (* or *) LinearRecurrence[ {6,-15,20,-15,8,-7,6,-2,0,-1},{0,0,0,0,0,0,1,5,15,35},40] (* Harvey P. Dale, May 31 2017 *)

Formula

G.f.: x^6*(1-x)/(x^5+x^3-3*x^2+3*x-1)^2. - Alois P. Heinz, Oct 23 2008

A137402 a(n) = Sum_{k=0..n} binomial(floor(n-2k/3), k).

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 16, 28, 48, 81, 136, 229, 388, 661, 1129, 1928, 3287, 5594, 9510, 16164, 27484, 46757, 79577, 135454, 230552, 392355, 667620, 1135924, 1932721, 3288563, 5595805, 9522067, 16203273, 27572144, 46917243, 79834375, 135845607, 231154212
Offset: 0

Views

Author

Don Knuth, Apr 11 2008

Keywords

Comments

A_n + B_{n-1} + C_{n-2} in the notation of A137356.
Lim_{n->infinity} a(n+1)/a(n) = x ~= 1.7016..., with x given by the real root (A324498) of (x - 1)^3*x^2 = 1. - Hugo Pfoertner, Mar 15 2019

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Programs

  • Magma
    [(&+[Binomial(Floor(n-2*k/3), k): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Mar 15 2019
    
  • Maple
    f:=n->add( binomial( floor(n-2*k/3), k), k=0..n);
  • Mathematica
    Table[Sum[Binomial[Floor[n-(2k)/3],k],{k,0,n}],{n,0,40}] (* or *) LinearRecurrence[{3,-3,1,0,1},{1,1,2,3,5},40] (* Harvey P. Dale, Aug 22 2011 *)
  • PARI
    Vec((1-2*x+2*x^2-x^3+x^4)/(1-3*x+3*x^2-x^3-x^5) + O(x^50)) \\ Colin Barker, Dec 14 2015
    
  • PARI
    a(n) = sum(k=0, n, binomial(floor(n-2*k/3), k)); \\ Altug Alkan, Dec 14 2015
    
  • Sage
    [sum(binomial(floor(n-2*k/3),k) for k in (0..n)) for n in (0..40)] # G. C. Greubel, Mar 15 2019

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-5); a(0)=1, a(1)=1, a(2)=2, a(3)=3, a(4)=5. - Harvey P. Dale, Aug 22 2011
G.f.: (1 - 2*x + 2*x^2 - x^3 + x^4) / (1 - 3*x + 3*x^2 - x^3 - x^5). - Colin Barker, Dec 14 2015

A324498 Decimal expansion of the real solution to x^2*(x-1)^3 = 1.

Original entry on oeis.org

1, 7, 0, 1, 6, 0, 6, 8, 8, 7, 1, 8, 1, 1, 7, 0, 8, 3, 3, 6, 9, 2, 2, 1, 6, 4, 6, 0, 8, 5, 5, 4, 2, 8, 8, 2, 2, 6, 9, 4, 6, 4, 7, 5, 4, 4, 9, 2, 8, 5, 7, 3, 5, 8, 4, 8, 5, 7, 7, 8, 2, 4, 2, 6, 3, 7, 6, 0, 3, 4, 5, 9, 3, 5, 9, 0, 7, 9, 1, 5, 8, 8, 7, 1, 0, 7, 0, 4, 8, 7
Offset: 1

Views

Author

Hugo Pfoertner, Mar 04 2019

Keywords

Comments

Asymptotic ratio of consecutive terms in A137402 for n -> infinity.

Examples

			1.701606887181170833692216460855428822694647544928573584857782426376...
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4, fascicle 1, section 7.1.4, p. 207, answer to exercise 126, Addison-Wesley, 2009.

Crossrefs

Programs

  • Mathematica
    RealDigits[Root[x^2 (x-1)^3-1,1],10,120][[1]] (* Harvey P. Dale, Nov 07 2022 *)
  • PARI
    solve(x=1,2,x^2*(x-1)^3-1)

A370722 a(n) = Sum_{k=0..floor(n/7)} binomial(n-4*k,3*k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 5, 11, 21, 36, 57, 85, 122, 173, 249, 371, 575, 918, 1485, 2398, 3830, 6030, 9369, 14422, 22107, 33909, 52226, 80888, 125925, 196706, 307653, 480873, 750275, 1168085, 1815191, 2817518, 4371772, 6785606, 10539893, 16384908, 25488736
Offset: 0

Views

Author

Seiichi Manyama, Feb 28 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -3, 1, 0, 0, 0, 1}, Table[1, 7], 50] (* Paolo Xausa, Mar 15 2024 *)
  • PARI
    a(n) = sum(k=0, n\7, binomial(n-4*k, 3*k));
    
  • PARI
    my(N=50, x='x+O('x^N)); Vec((1-x)^2/((1-x)^3-x^7))

Formula

G.f.: (1-x)^2/((1-x)^3 - x^7).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-7).

A138775 Triangle read by rows: T(n,k)=binomial(n-2k,3k) (n>=0, 0<=k<=n/5).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 10, 1, 20, 1, 35, 1, 56, 1, 1, 84, 7, 1, 120, 28, 1, 165, 84, 1, 220, 210, 1, 286, 462, 1, 1, 364, 924, 10, 1, 455, 1716, 55, 1, 560, 3003, 220, 1, 680, 5005, 715, 1, 816, 8008, 2002, 1
Offset: 0

Views

Author

Emeric Deutsch, May 10 2008

Keywords

Comments

Row n contains 1+floor(n/5) terms.
Row sums yield A137356.

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.

Crossrefs

Cf. A137356.

Programs

  • Maple
    T:=proc(n,k) options operator, arrow: binomial(n-2*k, 3*k) end proc: for n from 0 to 20 do seq(T(n,k),k=0..(1/5)*n) end do; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[Binomial[n-2k,3k],{n,0,20},{k,0,Floor[n/5]}]] (* Harvey P. Dale, Oct 14 2012 *)
Showing 1-10 of 10 results.