A370485 Number of permutations of [n] with the property that no subsequence k(k+1)(k+2) or (k+2)(k+1)k occurs but k(k+1) or (k+1)k occurs.
0, 0, 2, 4, 16, 78, 480, 3436, 28050, 256868, 2607584, 29061022, 352747696, 4632195548, 65432845858, 989341728564, 15942876295728, 272777484786062, 4938657746907200, 94332342088674252, 1895781452461383986, 39987981759263286340, 883322358371147863168
Offset: 0
Keywords
Examples
123 contains 3 consecutive number and 321 contains 3 consecutive number in reverse order. So a(3) = 6-2 = 4.
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..449
Programs
-
PARI
my(N=30, x='x+O('x^N)); concat([0, 0], Vec(sum(k=0, N, k!*x^k*(((1-2*x^2+x^3)/(1-x^3))^k-((1-2*x+x^2)/(1-x^2))^k))))