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.

A053221 Row sums of triangle A053218.

Original entry on oeis.org

1, 5, 16, 43, 106, 249, 568, 1271, 2806, 6133, 13300, 28659, 61426, 131057, 278512, 589807, 1245166, 2621421, 5505004, 11534315, 24117226, 50331625, 104857576, 218103783, 452984806, 939524069, 1946157028, 4026531811, 8321499106
Offset: 1

Views

Author

Asher Auel, Jan 01 2000

Keywords

Comments

Considered as a vector, the sequence = A074909 * [1, 2, 3, ...], where A074909 is the beheaded Pascal's triangle as a matrix. - Gary W. Adamson, Mar 06 2012
a(n) is the sum of the upper left n X n subarray of A052509 (viewed as an infinite square array). For example (1+1+1) + (1+2+2) + (1+3+4) = 16. - J. M. Bergot, Nov 06 2012
Number of ternary strings of length n that contain at least one 2 and at most one 0. For example, a(3) = 16 since the strings are the 6 permutations of 201, the 3 permutations of 211, the 3 permutations of 220, the 3 permutations of 221, and 222. - Enrique Navarrete, Jul 25 2021

Examples

			a(4) = 4 + 7 + 12 + 20 = 43.
		

Crossrefs

Programs

  • Magma
    [(n+2)*2^(n-1)-n-1: n in [1..50]]; // G. C. Greubel, Sep 03 2018
  • Maple
    A053221 := proc(n) (n+2)*2^(n-1)-n-1 ; end proc: # R. J. Mathar, Sep 02 2011
  • Mathematica
    Table[(n + 2)*2^(n - 1) - n - 1, {n, 29}] (* or *)
    Rest@ CoefficientList[Series[-x (-1 + x + x^2)/((2 x - 1)^2*(x - 1)^2), {x, 0, 29}], x] (* Michael De Vlieger, Sep 22 2017 *)
    LinearRecurrence[{6,-13,12,-4},{1,5,16,43},30] (* Harvey P. Dale, Jun 28 2021 *)
  • PARI
    vector(50,n, (n+2)*2^(n-1)-n-1) \\ G. C. Greubel, Sep 03 2018
    

Formula

a(n) = (n+2)*2^(n-1)-n-1. - Vladeta Jovovic, Feb 28 2003
G.f.: -x*(-1+x+x^2) / ( (2*x-1)^2*(x-1)^2 ). - R. J. Mathar, Sep 02 2011
a(n) = (1/2) * Sum_{k=1..n} Sum_{i=1..n} C(k,i) + C(n,k). - Wesley Ivan Hurt, Sep 22 2017
E.g.f.: exp(x)*(exp(x)-1)*(1+x). - Enrique Navarrete, Jul 25 2021
a(n+1) = 2*a(n) + A006127(n). - Ya-Ping Lu, Jan 01 2024