OFFSET
1,2
COMMENTS
a(n) is also the number of indecomposable permutations with exactly n inversions; there is one indecomposable permutation with no inversions. - David Bevan, Dec 19 2017
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
David Bevan, Table of n, a(n) for n = 1..1000
C. Cannings, J. Haigh, Montreal solitaire, J. Combin. Theory Ser. A 60 (1992), no. 1, 50-66.
FORMULA
a(n) = d(n, 1) where d(n, k) is defined in A007046. - Sean A. Irvine, Oct 06 2017
The ordinary generating function is f(1), where f(v) satisfies the functional equation f(v) = v*(1 + f(1 + x*v) - f(1)). The variable x marks inversions and v marks left-to-right minima. - David Bevan, Dec 19 2017
EXAMPLE
a(3) = 5; five indecomposable permutations have three inversions: 321, 2341, 2413, 3142, 4123. - David Bevan, Dec 19 2017
MATHEMATICA
r[1, 1]=1; r[_, 0]:=0; r[n_, k_]:=r[n, k]=Sum[r[n-k, j]Binomial[j+1, k], {j, k-1, (Sqrt[8(n-k)+1]-1)/2}]; a[n_]:=Sum[r[n, k], {k, (Sqrt[8n+1]-1)/2}]; Array[a, 20] (* David Bevan, Dec 19 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Sean A. Irvine, Oct 06 2017
STATUS
approved