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.

Showing 1-2 of 2 results.

A032087 Number of reversible strings with n beads of 4 colors. If more than 1 bead, not palindromic.

Original entry on oeis.org

4, 6, 24, 120, 480, 2016, 8064, 32640, 130560, 523776, 2095104, 8386560, 33546240, 134209536, 536838144, 2147450880, 8589803520, 34359607296, 137438429184, 549755289600, 2199021158400, 8796090925056, 35184363700224, 140737479966720, 562949919866880
Offset: 1

Views

Author

Keywords

Comments

From Petros Hadjicostas, Jun 30 2018: (Start)
Using the formulae in C. G. 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.)
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.)
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).
For the current sequence, c(1) = 4, and c(n) = 0 for all n >= 2, and thus, C(x) = 4*x. Substituting into the above formula for A(x), and doing the algebra, we get A(x) = 2*x*(2-5*x-8*x^2+32*x^3) / ((1+2*x)*(1-2*x)*(1-4*x)), which is R. J. Mathar's formula below.
(End)
The formula for a(n) for this sequence was Ralf Stephan's conjecture 72. It was solved by Elizabeth Wilmer (see Proposition 1 in one of the links below). She does not accept Bower's assertion that a string of length 1 is not palindromic. - Petros Hadjicostas, Jul 05 2018

Crossrefs

Column 4 of A293500 for n>1.
Cf. A000302, A026337 (bisection), A032121, A056450, A088037.

Programs

  • Magma
    A032087:= func< n | n eq 1 select 4 else 2^(2*n-1) -(3-(-1)^n)*2^(n-2) >;
    [A032087(n): n in [1..30]]; // G. C. Greubel, Oct 02 2024
    
  • Mathematica
    Join[{4}, LinearRecurrence[{4, 4, -16}, {6, 24, 120}, 24]] (* Jean-François Alcover, Oct 11 2017 *)
  • PARI
    Vec(2*x*(2 - 5*x - 8*x^2 + 32*x^3) / ((1 - 2*x)*(1 + 2*x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Mar 08 2017
    
  • SageMath
    def A032087(n): return 2^(2*n-1) -3*2^(n-2) +(-2)^(n-2) +4*int(n==1)
    [A032087(n) for n in range(1,31)] # G. C. Greubel, Oct 02 2024

Formula

"BHK" (reversible, identity, unlabeled) transform of 4, 0, 0, 0, ...
a(2*n+1) = 2^(4*n+1) - 2^(2*n+1), a(2*n) = 2^(4*n-1) - 2^(2*n) + 2^(2*n-1), a(1)=4.
a(n) = (A000302(n) - A056450(n))/2 for n > 1.
From R. J. Mathar, Mar 20 2009: (Start)
a(n) = 4*a(n-1) + 4*a(n-2) - 16*a(n-3) for n > 4.
G.f.: 2*x*(2-5*x-8*x^2+32*x^3)/((1-2*x)*(1+2*x)*(1-4*x)). (End)
From Colin Barker, Mar 08 2017: (Start)
a(n) = 2^(n-1) * (2^n-1) for n > 1 and even.
a(n) = 2^(2*n-1) - 2^n for n > 1 and odd. (End)
E.g.f.: (1/4)*( exp(-2*x) - 3*exp(2*x) + 2*exp(4*x) ) + 4*x. - G. C. Greubel, Oct 02 2024

A085903 Expansion of (1 + 2*x^2)/((1 + x)*(1 - 2*x)*(1 - 2*x^2)).

Original entry on oeis.org

1, 1, 7, 9, 31, 49, 127, 225, 511, 961, 2047, 3969, 8191, 16129, 32767, 65025, 131071, 261121, 524287, 1046529, 2097151, 4190209, 8388607, 16769025, 33554431, 67092481, 134217727, 268402689, 536870911, 1073676289, 2147483647
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 16 2003

Keywords

Comments

Resultant of the polynomial x^n - 1 and the Chebyshev polynomial of the first kind T_2(x).
This sequence is the case P1 = 1, P2 = 0, Q = -2 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 27 2014

Crossrefs

Programs

  • Magma
    [Round((Sqrt(2)^n - 1)*(Sqrt(2)^n - (-1)^n)): n in [1..40]]; // Vincenzo Librandi, Apr 28 2014
    
  • Maple
    seq(simplify((sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n)), n = 1..30); # Peter Bala, Apr 27 2014
  • Mathematica
    CoefficientList[ Series[(1 + 2x^2)/(1 - x - 4x^2 + 2x^3 + 4x^4), {x, 0, 30}], x] (* Robert G. Wilson v, May 04 2013 *)
    LinearRecurrence[{1,4,-2,-4},{1,1,7,9},40] (* Harvey P. Dale, Jul 25 2016 *)
  • PARI
    a(n) = polresultant(x^n - 1, 2*x^2 - 1) \\ David Wasserman, Feb 10 2005
    
  • Python
    def A085903(n): return (1<>1))-1)**2 # Chai Wah Wu, Jun 19 2024

Formula

a(2*n) = 2*4^n - 1, a(2*n + 1) = (2^n - 1)^2; interlaces A083420 with A060867 (squares of Mersenne numbers A000225). - Creighton Dement, May 19 2005
A107663(2*n) = a(2*n) = A083420(n). - Creighton Dement, May 19 2005
From Peter Bala, Apr 27 2014: (Start)
a(n) = (sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n).
a(n) = Product_{k = 1..n} ( 2 - exp(4*k*Pi*i/n) ). (End)
E.g.f.: exp(-x) + exp(2*x) - 2*cosh(sqrt(2)*x). - Ilya Gutkovskiy, Jun 16 2016

Extensions

More terms from David Wasserman, Feb 10 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 15 2007
Showing 1-2 of 2 results.