OFFSET
0,3
COMMENTS
Binomial transform of (0,1,0,3,0,0,0,...). - Paul Barry, Sep 14 2006
Also the number of permutations of length n which can be sorted by a single cut-and-paste move (in the sense of Cranston, Sudborough, and West). - Vincent Vatter, Aug 21 2013
Main diagonal of A317302. - Omar E. Pol, Aug 11 2018
a(n) is the number of ternary strings of length n that contain exactly one 1, zero or two 2's and have no restriction on the number of 0's. For example, a(5) = 35 since the strings are 12200 (30 of this type) and 10000 (5 of this type). - Enrique Navarrete, May 08 2025
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..1000
Daniel W. Cranston, I. Hal Sudborough, and Douglas B. West, Short proofs for cut-and-paste sorting of permutations, Discrete Math., Vol. 307, Iss. 22 (2007), pp. 2866-2870.
Cheyne Homberger, Patterns in Permutations and Involutions: A Structural and Enumerative Approach, arXiv preprint 1410.2657 [math.CO], 2014.
Cheyne Homberger and Vincent Vatter, On the effective and automatic enumeration of polynomial permutation classes. [Broken link]
Cheyne Homberger and Vincent Vatter, On the effective and automatic enumeration of polynomial permutation classes, arXiv preprint arXiv:1308.4946 [math.CO], 2013-2015.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (n*(n-2)^2 + n^2)/2.
E.g.f.: exp(x)*x*(1+x^2/2). - Paul Barry, Sep 14 2006
G.f.: x*(1-2*x+4*x^2)/(1-x)^4. - R. J. Mathar, Sep 02 2008
a(n) = A057145(n,n). - R. J. Mathar, Jul 28 2016
a(n) = A000124(n-2)*n. - Bruce J. Nicholson, Jul 13 2018
a(n) = Sum_{i=0..n-1} (i*(n-2) + 1). - Ivan N. Ianakiev, Sep 25 2020
From Elmo R. Oliveira, Sep 09 2025: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = A242659(n)/2. (End)
MAPLE
MATHEMATICA
Table[(n (n-2)^2+n^2)/2, {n, 0, 50}] (* Harvey P. Dale, Aug 05 2011 *)
CoefficientList[Series[x (1 - 2 x + 4 x^2) / (1 - x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Feb 16 2015 *)
Table[PolygonalNumber[n, n], {n, 0, 50}] (* Harvey P. Dale, Mar 07 2016 *)
LinearRecurrence[{4, -6, 4, -1}, {0, 1, 2, 6}, 50] (* Harvey P. Dale, Mar 07 2016 *)
PROG
(PARI) a(n) = { (n*(n - 2)^2 + n^2)/2 } \\ Harry J. Smith, Jul 04 2009
(Magma) [(n*(n-2)^2+n^2)/2: n in [0..50]]; // Vincenzo Librandi, Feb 16 2015
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Hareendra Yalamanchili (hyalaman(AT)mit.edu), Apr 01 2001
STATUS
approved
