A032092 Number of reversible strings with n-1 beads of 2 colors. 5 beads are black. String is not palindromic.
3, 9, 28, 60, 126, 226, 396, 636, 1001, 1491, 2184, 3080, 4284, 5796, 7752, 10152, 13167, 16797, 21252, 26532, 32890, 40326, 49140, 59332, 71253, 84903, 100688, 118608, 139128, 162248, 188496, 217872, 250971, 287793, 329004, 374604, 425334, 481194, 543004
Offset: 7
Examples
From _Petros Hadjicostas_, May 19 2018: (Start) For n=7, we have the following 3 reversible non-palindromic compositions with 6 parts of n: 1+1+1+1+1+2 (= 2+1+1+1+1+1), 1+1+1+1+2+1 (= 1+2+1+1+1+1), and 1+1+1+2+1+1 (= 1+1+2+1+1+1). Using the process described in the comments, we get the following reversible non-palindromic strings with 5 black balls and n-6 = 1 white balls: BBBBBW (= WBBBBB), BBBBWB (= BWBBBB), and BBBWBB (= BBWBBB). For n=8, we get the following 9 compositions and 9 corresponding strings: 1+1+1+1+1+3 <-> BBBBBWW 1+1+1+1+3+1 <-> BBBBWWB 1+1+1+3+1+1 <-> BBBWWBB 1+1+1+1+2+2 <-> BBBBWBW 1+1+1+2+1+2 <-> BBBWBBW 1+1+2+1+1+2 <-> BBWBBBW 1+2+1+1+1+2 <-> BWBBBBW 1+1+1+2+2+1 <-> BBBWBWB 1+1+2+1+2+1 <-> BBWBBWB (End)
Links
- Colin Barker, Table of n, a(n) for n = 7..1000
- C. G. Bower, Transforms (2)
- Pieter Moree, The formal series Witt transform, Discr. Math. no. 295 vol. 1-3 (2005) 143-160. - _R. J. Mathar_, Nov 08 2008
- Index entries for linear recurrences with constant coefficients, signature (3,0,-8,6,6,-8,0,3,-1).
Programs
-
Mathematica
LinearRecurrence[{3,0,-8,6,6,-8,0,3,-1},{3,9,28,60,126,226,396,636,1001},50] (* Harvey P. Dale, Mar 19 2017 *) f[n_] := Binomial[n - 1, n - 6]/2 - If[ OddQ@ n, 0, Binomial[(n/2) - 1, (n - 6)/2]/2]; Array[a, 40, 7] (* or *) CoefficientList[ Series[(x^7 (x^2 + 3))/((x - 1)^6 (x + 1)^3), {x, 0, 46}], x] (* Robert G. Wilson v, May 20 2018 *)
-
PARI
Vec(x^7*(3+x^2)/((1-x)^6*(1+x)^3) + O(x^100)) \\ Colin Barker, Mar 07 2015
Formula
"BHK[ 6 ]" (reversible, identity, unlabeled, 6 parts) transform of 1, 1, 1, 1, ...
G.f.: x^7*(3+x^2)/((1-x)^6*(1+x)^3). - R. J. Mathar, Nov 08 2008
From Colin Barker, Mar 07 2015: (Start)
a(n) = (2*n^5-30*n^4+170*n^3-480*n^2+728*n-480)/480 if n is even.
a(n) = (2*n^5-30*n^4+170*n^3-450*n^2+548*n-240)/480 if n is odd.
(End)
From Petros Hadjicostas, May 19 2018: (Start)
a(n) = (1/2)*(binomial(n-1, n-6) - binomial((n/2)-1, (n-6)/2)) if n is even.
a(n) = (1/2)*binomial(n-1, n-6) if n is odd.
G.f.: (1/2)*((x/(1-x))^6 - (x^2/(1-x^2))^3).
These formulae agree with the above formulae by R. J. Mathar and C. Barker.
(End)
Comments