|
Search: id:A098813
|
|
|
| A098813 |
|
For a string of letters of length k, say abc...def, let f(k) be the string of length k-1 consisting of the adjacent pairs ab, bc, cd, ..., de, ef. Given n, let U be the string of length 2n consisting of n 1's followed by n 2's: 11...122...2. Then a(n) = number of the C(2n,n) permutations V of U such that f(U) and f(V) agree in exactly one place. |
|
+0 2
|
|
| 1, 1, 4, 19, 57, 178, 543, 1591, 4598, 13117, 36999, 103514, 287653, 794847, 2186054
(list; graph; listen)
|
|
|
OFFSET
|
1,3
|
|
|
COMMENT
|
The number of V's such that f(U) and f(V) agree in no positions gives the A051292(n+1) sequence (Whitney numbers): 1, 4, 9, 21, 52, 127, 313, 778, 1941, 4863, 12228, 30817, ...
|
|
EXAMPLE
|
For n=1, U = 12 and only one V, 12 is a 1-match, so a(1)=1.
For n=2, U = 1122, f(U) = 11,12,22, and only one V, 2121 is a 1-match, with f(v) = 21,12,21, so a(1)=1.
For n=3, U = 111222 and only the four V's 112212, 121122, 121221, and 221211 are 1-matches, so a(3)=4.
|
|
MAPLE
|
with(combinat): for n from 1 to 10 do y:=0:B:=array: M:=[seq(11, i=1..n-1), seq(12, i=n), seq(22, i=n+1..2*n-1)]: S:=[seq(i, i=1..2*n)]: L:=choose(S, n): for j from 1 to binomial(2*n, n) do for k from 1 to 2*n-1 do if member(k, L[j]) then B[k]:=10 else B[k]:=20 end if: if member(k+1, L[j]) then B[k]:=B[k]+1 else B[k]:=B[k]+2 end if end do: x:=0: for l from 1 to 2*n-1 do if B[l]=M[l] then x:=x+1 end if end do: if x=1 then y:=y+1 end if end do: print(y) end do: (Kristof)
|
|
CROSSREFS
|
Cf. A051292.
Sequence in context: A020496 A108484 A134507 this_sequence A055485 A000306 A100185
Adjacent sequences: A098810 A098811 A098812 this_sequence A098814 A098815 A098816
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
Lajos Zerinvary (zlaja(AT)freemail.hu), Oct 07 2004 (helped by Miklos Kristof, kristmikl(AT)freemail.hu)
|
|
EXTENSIONS
|
a(13)-a(15) from Ray Chandler (rayjchandler(AT)sbcglobal.net), Oct 25 2004
|
|
|
Search completed in 0.002 seconds
|