A032097 "BHK" (reversible, identity, unlabeled) transform of 2,1,1,1,...
2, 2, 5, 14, 39, 107, 289, 772, 2047, 5402, 14213, 37325, 97905, 256622, 672337, 1760998, 4611643, 12075527, 31617521, 82781216, 216732891, 567428402, 1485570025, 3889310329, 10182407329, 26657986682, 69791674109, 182717232062, 478360339887
Offset: 1
Examples
From _Petros Hadjicostas_, May 20 2018: (Start) According to C. G. Bower, in his website above, we have boxes of different colors and sizes (the size of the box is determined by the number of balls it can hold). Since c(1) = 2, each box of size 1 can have one of two colors, say A and B. On the other hand, since c(n) = 1 for n >= 2, each box of size >= 2 can be of one color only (and there is no need to specify it). Then a(n) = BHK(c(n): n >= 1)(n) = number of ways we can have boxes on a line such that the total number of balls is n and the array of boxes is reversible but not palindromic (with the exception when having only one box on the line). Hence, for n=1, the a(1) = 2 possible arrays are 1_A and 1_B. For n=2, the a(2) = 2 possible arrays for the boxes are 1_A 1_B and 2. (Note that 1_A 1_B is not palindromic because the boxes have different colors even though each one has only 1 ball.) For n=3, the a(3) = 5 possible arrays for the boxes are: 3 (one box on the line); 1_A 2, 1_B 2 (two boxes on the line); 1_A 1_B 1_B, 1_A 1_A 1_B (three boxes on the line). For n=4, the a(4) = 14 possible arrays for the boxes are: 4 (one box on the line); 1_A 3, 1_B 3 (two boxes on the line); 1_A 1_A 2, 1_A 1_B 2, 1_B 1_A 2, 1_B 1_B 2, 1_A 2 1_B (three boxes on the line); 1_A 1_A 1_A 1_B, 1_A 1_A 1_B 1_A, 1_A 1_A 1_B 1_B, 1_A 1_B 1_B 1_B, 1_B 1_A 1_B 1_B, 1_A 1_B 1_A 1_B (four boxes on the line). (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- C. G. Bower, Transforms (2)
- Index entries for linear recurrences with constant coefficients, signature (5,-7,1,3,-1).
Programs
-
Magma
[2] cat [1/2*(Fibonacci(2*n+1) - Fibonacci(n+2) + 2): n in [2..30]]; // Vincenzo Librandi, Oct 19 2013
-
Mathematica
CoefficientList[Series[(x^5 - 4 x^4 + x^3 + 9 x^2 - 8 x + 2)/((x - 1) (x^2 - 3 x + 1) (x^2 + x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 19 2013 *) Join[{2}, Table[(Fibonacci[2 n + 1] - Fibonacci[n + 2])/2 + 1, {n, 2, 20}]] (* Eric W. Weisstein, Apr 18 2018 *) Join[{2}, LinearRecurrence[{5, -7, 1, 3, -1}, {2, 5, 14, 39, 107}, 20]] (* Eric W. Weisstein, Apr 18 2018 *)
Formula
For n > 1, a(n) = (1/2)*(F(2n+1) - F(n+2) + 2), where F(n) = A000045(n). - Ralf Stephan, May 04 2004
G.f.: x*(x^5-4*x^4+x^3+9*x^2-8*x+2)/((x-1)*(x^2-3*x+1)*(x^2+x-1)). - Colin Barker, Sep 22 2012
Extensions
More terms from Vincenzo Librandi, Oct 19 2013
Comments