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

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

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 5, 11, 21, 36, 58, 92, 149, 250, 431, 750, 1299, 2227, 3784, 6401, 10828, 18364, 31236, 53228, 90741, 154603, 263178, 447702, 761403, 1295022, 2203162, 3749001, 6380241, 10858285, 18478155, 31443013, 53501860, 91034937, 154900529, 263576791
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
    I:=[1,1,1,1,1]; [n le 5 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3)+Self(n-5): n in [1..45]]; // Vincenzo Librandi, Aug 09 2015
  • Maple
    f:= gfun:-rectoproc({a(n) = 3*a(n-1)-3*a(n-2)+a(n-3)+a(n-5),seq(a(i)=1,i=0..4)},a(n),remember):
    map(f, [$0..50]); # Robert Israel, May 26 2017
  • Mathematica
    LinearRecurrence[{3, -3, 1, 0, 1}, {1, 1, 1, 1, 1}, 50] (* Vincenzo Librandi, Aug 09 2015 *)
    CoefficientList[Series[(1-x)^2/(1 - 3 x + 3 x^2 - x^3 - x^5), {x, 0, 40}], x] (* Vaclav Kotesovec, Aug 09 2015 *)
    Table[Sum[Binomial[n-2k,3k],{k,0,n/2}],{n,0,50}] (* Harvey P. Dale, Nov 07 2021 *)

Formula

Let A_n = Sum_{k<=n/2}binomial(n-2k,3k) (the present sequence), B_n= Sum_{k<=n/2}binomial(n-2k, 3k+1)(A137357), C_n= Sum_{k<=n/2}binomial(n-2k, 3k+2) (A137358).
Then A_n = A_{n-1} + C_{n-3} + \delta_{n0}, B_n=B_{n-1} + A_{n-1}, C_n=C_{n-1} + B_{n-1};
so the generating functions are A = (1-z)^2/p(z), B=z(1-z)/p(z), C=z^2/p(z),
where p(z) = (1-z)^3 - z^5 = 1 - 3z + 3z^2 - z^3 - z^5.
The growth ratio is the real root of r^2(r-1)^3 = 1, approximately 1.70161.
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3)+a(n-5). - Vincenzo Librandi, Aug 09 2015
a(n) = hypergeom([-(1/5)*n, -(1/5)*n+1/5, 2/5-(1/5)*n, 3/5-(1/5)*n, -(1/5)*n+4/5], [1/3, 2/3, -(1/2)*n, -(1/2)*n+1/2], -3125/108). - Robert Israel, May 26 2017
G.f.: -(x-1)^2/(-1+3*x-3*x^2+x^3+x^5) . - R. J. Mathar, May 29 2017

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

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)

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

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 1, 28, 6, 36, 21, 45, 56, 55, 126, 66, 252, 1, 78, 462, 9, 91, 792, 45, 105, 1287, 165, 120, 2002, 495, 136, 3003, 1287, 1, 153, 4368, 3003, 12, 171, 6188, 6435, 78, 190, 8568, 12870, 364
Offset: 2

Views

Author

Emeric Deutsch, May 10 2008

Keywords

Comments

Row n contains floor((n+3)/5) terms.
Row sums yield A137358.

References

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

Crossrefs

Cf. A137358.

Programs

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