cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A032096 "BHK" (reversible, identity, unlabeled) transform of 2,2,2,2,...

This page as a plain text file.
%I A032096 #49 May 25 2024 19:35:58
%S A032096 2,3,8,23,74,227,704,2135,6482,19523,58808,176663,530714,1592867,
%T A032096 4780784,14344535,43040162,129127043,387400808,1162222103,3486725354,
%U A032096 10460235107,31380882464,94142824535,282429005042
%N A032096 "BHK" (reversible, identity, unlabeled) transform of 2,2,2,2,...
%C A032096 From _Petros Hadjicostas_, May 20 2018: (Start)
%C A032096 Using the formulae in C. B. Bower's web link below about transforms, it can be proved that, for k >= 2, the BHK[k] transform of sequence (c(n): n >= 1), which has g.f. C(x) = Sum_{n >= 1} c(n)*x^n, has generating function B_k(x) = (1/2)*(C(x)^k - C(x^2)^{k/2}) if k is even, and B_k(x) = C(x)*B_{k-1}(x) = (C(x)/2)*(C(x)^{k-1} - C(x^2)^{(k-1)/2}) if k is odd. For k=1, Bower assumes that the BHK[k=1] transform of (c(n): n >= 1) is itself, which means that the g.f. of the output sequence is C(x). (This assumption is not accepted by all mathematicians because a sequence of length 1 is not only reversible but palindromic as well.)
%C A032096 Since a(m) = BHK(c(n): n >= 1)(m) = Sum_{k=1..m} BHK[k](c(n): n >= 1)(m) for m = 1,2,3,..., it can be easily proved (using sums of infinite geometric series) that the g.f. of BHK(c(n): n >= 1) is A(x) = (C(x)^2 - C(x^2))/(2*(1-C(x))*(1-C(x^2))) + C(x). (The extra C(x) is due of course to the special assumption made for the BHK[k=1] transform.)
%C A032096 Here, BHK(c(n): n >= 1)(m) indicates the m-th element of the output sequence when the transform is BHK and the input sequence is (c(n): n >= 1). Similarly, BHK[k](c(n): n >= 1)(m) indicates the m-th element of the output sequence when the transform is BHK[k] (i.e., with k boxes) and the input sequence is (c(n): n >= 1).
%C A032096 For the current sequence, c(n) = 2 for all n >= 1, and thus, C(x) = 2*x/(1-x). Substituting into the above formula for A(x), and doing the algebra, we get A(x) = x*(2-5*x-4*x^2+15*x^3)/((1-x)*(1-3*x)*(1-3*x^2)), which is the formula conjectured by _Colin Barker_ below.
%C A032096 Using partial fraction decomposition, we get A(x) = (1/3) + 2*x/(1-x) + (1/3)/(1-3*x) - (1/3 + 1/(2*sqrt(3)))/(1-sqrt(3)*x) + (-1/3 + 1/(2*sqrt(3)))/(1 + sqrt(3)*x). From this, we get a(n) = 2 + 3^{n-1} - 2*3^{(n/2) -1} when n is even and a(n) = 2 + 3^{n-1} -3^{(n-1)/2} when n is odd, which verify _Ralf Stephan_'s formula below.
%C A032096 (End)
%H A032096 Vincenzo Librandi, <a href="/A032096/b032096.txt">Table of n, a(n) for n = 1..200</a>
%H A032096 C. G. Bower, <a href="/transforms2.html">Transforms (2)</a>
%H A032096 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,0,-12,9).
%F A032096 a(n) = (1/6)*((-1)^n-5)*3^floor(n/2) + 3^(n-1) + 2. - _Ralf Stephan_, May 11 2004
%F A032096 From _Colin Barker_, Sep 22 2012: (Start)
%F A032096 Conjecture: a(n) = 4*a(n-1) - 12*a(n-3) + 9*a(n-4).
%F A032096 G.f.: x*(2-5*x-4*x^2+15*x^3)/((1-x)*(1-3*x)*(1-3*x^2)). (End)
%F A032096 3*a(n) = 6+3^n-A038754(n+1). - _R. J. Mathar_, Mar 24 2023
%e A032096 From _Petros Hadjicostas_, May 20 2018: (Start)
%e A032096 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(n) = 2 for all n >= 1, each box can have one of two colors, say A and B. Then a(n) = BIK(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).
%e A032096 Hence, for n=1, the a(1) = 2 possible arrays are 1_A and 1_B. For n=2, the a(2) = 3 possible arrays for the boxes are 1_A 1_B, 2_A, and 2_B. (Note that 1_A 1_B is not palindromic because the boxes have different colors even though each one has only 1 ball.)
%e A032096 For n=3, the a(3) = 8 possible arrays for the boxes are:
%e A032096   3_A, 3_B (one box on the line);
%e A032096   1_A 2_B, 1_B 2_A, 1_A 2_A, 1_B 2_B (two boxes on the line);
%e A032096   1_A 1_B 1_B, 1_A 1_A 1_B (three boxes on the line).
%e A032096 For n=4, the a(4) = 23 possible arrays for the boxes are:
%e A032096   4_A, 4_B (one box on the line);
%e A032096   2_A 2_B, 3_A 1_A, 3_A 1_B, 3_B 1_A, 3_B 1_B (two boxes on the line);
%e A032096   1_A 1_A 2_A, 1_A 1_A 2_B, 1_A 1_B 2_A, 1_A 1_B 2_B, 1_B 1_A 2_A, 1_B 1_A 2_B,
%e A032096     1_B 1_B 2_A, 1_B 1_B 2_B, 1_A 2_A 1_B, 1_A 2_B 1_B (three boxes on the line);
%e A032096   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,
%e A032096     1_B 1_A 1_B 1_B, 1_B 1_A 1_B 1_A (for boxes on the line).
%e A032096 (End)
%t A032096 Table[((1/6) ((-1)^n - 5) 3^(Floor[n/2]) + 3^(n - 1) + 2), {n, 1, 40}] (* _Vincenzo Librandi_, Oct 19 2013 *)
%o A032096 (Magma) [(1/6)*((-1)^n-5)*3^Floor(n/2) + 3^(n-1) + 2: n in [1..30]]; // _Vincenzo Librandi_, Oct 19 2013
%K A032096 nonn,easy
%O A032096 1,1
%A A032096 _Christian G. Bower_