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.

Previous Showing 21-30 of 72 results. Next

A204089 The number of 1 by n Haunted Mirror Maze puzzles with a unique solution ending with a mirror, where mirror orientation is fixed.

Original entry on oeis.org

1, 1, 4, 14, 48, 164, 560, 1912, 6528, 22288, 76096, 259808, 887040, 3028544, 10340096, 35303296, 120532992, 411525376, 1405035520, 4797091328, 16378294272, 55918994432, 190919389184, 651839567872, 2225519493120, 7598398836736, 25942556360704, 88573427769344
Offset: 0

Views

Author

David Nacin, Jan 10 2012

Keywords

Comments

Apart from a leading 1, the same as A007070. - R. J. Mathar, Jan 16 2012
Since the uniqueness of a solution is unaffected by the orientation of the mirrors in this 1 by n case, we assume mirror orientation is fixed for this sequence.
Dropping the requirement that the board end with a mirror gives A204090. Allowing for mirror orientation gives A204091. Allowing for orientation and dropping the requirement gives A204092.

Examples

			For M(3) we would have the following possibilities:
('Z', 'Z', '/')
('Z', 'G', '/')
('Z', '/', '/')
('V', 'V', '/')
('V', 'G', '/')
('V', '/', '/')
('G', 'Z', '/')
('G', 'V', '/')
('G', 'G', '/')
('G', '/', '/')
('/', 'Z', '/')
('/', 'V', '/')
('/', 'G', '/')
('/', '/', '/')
		

Crossrefs

Programs

  • Magma
    [1] cat [n le 2 select 4^(n-1) else 4*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 21 2022
    
  • Mathematica
    LinearRecurrence[{4,-2}, {1,1,4}, 31]
  • PARI
    Vec((1-x)*(1-2*x)/(1-4*x+2*x^2) + O(x^30)) \\ Michel Marcus, Dec 06 2015
    
  • Python
    def a(n, d={0:1, 1:4}):
        if n in d: return d[n]
        d[n] = 4*a(n-1) - 2*a(n-2)
        return d[n]
    print([1]+[a(n) for n in range(31)])
    
  • Python
    #Produces a(n) through enumeration and also displays boards:
    def Mprint(n):
     print('The following generate boards with a unique solution')
     s=0
     for x in product(['Z', 'V', 'G', '/'], repeat=n):
      if x[-1]=='/':
       #Splitting x up into a list pieces
       y=list(x)
       z=list()
       while y:
        #print(y)
        if '/' in y:
         if y[0] != '/': #Don't need to add blank pieces to z
          z.append(y[:y.index('/')])
         y=y[y.index('/')+1:]
        else:
         z.append(y)
         y=[]
       #For each element in the list checking for Z&V together
       goodword=True
       for w in z:
        if 'Z' in w and 'V' in w:
         goodword=False
       if goodword:
        s+=1
        print(x)
     return s
    
  • SageMath
    def A204089(n): return int(n==0) + 2^((n-1)/2)*chebyshev_U(n-1, sqrt(2))
    [A204089(n) for n in range(31)] # G. C. Greubel, Dec 21 2022

Formula

G.f.: (1-x)*(1-2*x)/(1-4*x+2*x^2).
a(n) = Sum_{i=0..n-1} a(i) * (2^(n-i)-1), with a(0)=1.
a(n) = 4*a(n-1) - 2*a(n-2), a(1)=1, a(2)=4.
G.f.: (1-x)*(1-2*x)/(1 - 4*x + 2*x^2) = 1/(1 + U(0)) where U(k)= 1 - 2^k/(1 - x/(x - 2^k/U(k+1) )); (continued fraction 3rd kind, 3-step). - Sergei N. Gladkovskii, Dec 05 2012
a(n) = ((2+sqrt(2))^n - (2-sqrt(2))^n)/(2*sqrt(2)). - Colin Barker, Dec 06 2015
a(n) = [n=0] + 2^((n-1)/2)*ChebyshevU(n-1, sqrt(2)). - G. C. Greubel, Dec 21 2022
E.g.f.: 1 + exp(2*x)*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, May 20 2024

A060995 Number of routes of length 2n on the sides of an octagon from a point to opposite point.

Original entry on oeis.org

0, 2, 8, 28, 96, 328, 1120, 3824, 13056, 44576, 152192, 519616, 1774080, 6057088, 20680192, 70606592, 241065984, 823050752, 2810071040, 9594182656, 32756588544, 111837988864, 381838778368, 1303679135744
Offset: 1

Views

Author

Henry Bottomley, May 13 2001

Keywords

Comments

Also the 2nd row in the 2-shuffle Phi_2(W(sqrt(2))) of the Fraenkel-Kimberling publication. - R. J. Mathar, Aug 17 2009
First differences of A056236. - Jeremy Gardiner, Aug 11 2013

Programs

  • Mathematica
    LinearRecurrence[{4,-2},{0,2},40] (* Harvey P. Dale, Mar 03 2012 *)
  • PARI
    { for (n=1, 200, if (n>2, a=4*a1 - 2*a2; a2=a1; a1=a, if (n==1, a=a2=0, a=a1=2)); write("b060995.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 16 2009
    
  • Sage
    [(lucas_number2(n,4,2)-lucas_number2(n-1,4,2)) for n in range(0, 24)] # Zerinvary Lajos, Nov 10 2009

Formula

G.f.: 2*x^2/(1-4*x+2*x^2).
a(n) = (2 + sqrt(2))^(n-1)/sqrt(2) - (2-sqrt(2))^(n-1)/sqrt(2).
a(n) = 4*a(n-1)-2*a(n-2).
a(n) = 2*A007070(n-2)
G.f.: G(0)/(2*x) - 1/x, where G(k)= 1 + 1/( 1 - 4*x^2/(4*x^2 + 2*(1-2*x)^2/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 16 2013

A068912 Number of n step walks (each step +/-1 starting from 0) which are never more than 3 or less than -3.

Original entry on oeis.org

1, 2, 4, 8, 14, 28, 48, 96, 164, 328, 560, 1120, 1912, 3824, 6528, 13056, 22288, 44576, 76096, 152192, 259808, 519616, 887040, 1774080, 3028544, 6057088, 10340096, 20680192, 35303296, 70606592, 120532992, 241065984, 411525376, 823050752, 1405035520, 2810071040
Offset: 0

Views

Author

Henry Bottomley, Mar 06 2002

Keywords

Comments

The number of n step walks (each step +/-1 starting from 0) which are never more than k or less than -k is given by a(n,k) = 2^n/(k+1)*Sum_{r=1..k+1} (-1)^r*cos((Pi*(2*r-1))/(2*(k+1)))^n*cot((Pi*(1-2*r))/(4*(k+1))). Here we have k=3. - Herbert Kociemba, Sep 19 2020

Crossrefs

Cf. A000007, A016116 (without initial term), A068911, A068913 for similar.

Programs

  • Maple
    # From Peter Luschny, Sep 20 2020: (Start)
    r := 1 + 2^(1/2): s := 1 - 2^(1/2):
    c := n -> (1+r)^(n/2)*(r+(2*(1+r))^(1/2)+(-1)^n*(r-(2*(1+r))^(1/2))):
    b := n -> (1+s)^(n/2)*(s-(2*(1+s))^(1/2)+(-1)^n*(s+(2*(1+s))^(1/2))):
    a := n -> (c(n) + b(n))/4:
    # Alternatively:
    a := proc(n) local h; h := n -> add((1+x)*(2+x)^(n/2), x=[sqrt(2),-sqrt(2)]);
    if n::even then h(n)/2 else h(n-1) fi end:
    seq(simplify(a(n)), n=0..30); # (End)
  • Mathematica
    nn=33; CoefficientList[Series[s+a + b + c + d + e +f/.Solve[{s ==1 + x a + x b, a==x s + x c, b==x s +x d, c==x a +x e, d== x b + x f, e==x c, f==x d,z==x e + x f },{s,a,b,c,d,e,f,z}],{x,0,nn}],x] (* Geoffrey Critzer, Jan 13 2014 *)
    a[n_,k_]:=2^n /(k+1) Sum[(-1)^r Cos[(Pi (2r-1))/(2 (k+1))]^n Cot[(Pi (1-2r))/(4 (k+1))] ,{r,1,k+1}]
    Table[a[n,3],{n,0,40}]//Round (* Herbert Kociemba, Sep 19 2020 *)
    a[n_]:=Module[{r=2+Sqrt[2]},Floor[(r^(n/2) (-2 (-1+(-1)^n) Sqrt[r]+(1+(-1)^n) r))/(4 Sqrt[2])]]
    Table[a[n],{n,0,40}] (* Herbert Kociemba, Sep 21 2020 *)

Formula

G.f.: (1+2*x)/(1-4*x^2+2*x^4).
a(n) = A068913(3, n).
a(n) = 4*a(n-2) - 2*a(n-4).
a(2*n) = A007070(n) = 2*a(2*n-1)-A060995(n); a(2*n+1) = 2*a(2*n).
a(n) = (2^n/4)*Sum_{r=1..4} (-1)^r*cos((Pi*(2*r-1))/8)^n*cot((Pi*(1-2*r))/16). - Herbert Kociemba, Sep 19 2020
Conjecture: a(n) = floor((1+r)^(n/2)*(r+(2*(1+r))^(1/2)+(-1)^n*(r-(2*(1+r))^(1/2)))/4) where r = 1 + 2^(1/2). - Peter Luschny, Sep 20 2020
From Herbert Kociemba, Sep 20 2020: (Start)
With the standard procedure to obtain an explicit formula for a(n) for a linear recurrence and r1=2-sqrt(2) and r2=2+sqrt(2) we get
a(n) = a1(n) + a2(n) with
a1(n) = -(r1^(n/2)*(-2*(-1+(-1)^n)*sqrt(r1)+(1+(-1)^n)*r1))/(4*sqrt(2)) and
a2(n) = +(r2^(n/2)*(-2*(-1+(-1)^n)*sqrt(r2)+(1+(-1)^n)*r2))/(4*sqrt(2)).
We have -1

A102285 G.f. (1-x)/(7*x^2-6*x+1).

Original entry on oeis.org

1, 5, 23, 103, 457, 2021, 8927, 39415, 174001, 768101, 3390599, 14966887, 66067129, 291634565, 1287337487, 5682582967, 25084135393, 110726731589, 488771441783, 2157541529575, 9523849084969, 42040303802789
Offset: 0

Author

Creighton Dement, Feb 19 2005

Keywords

Comments

A floretion-generated sequence relating to the second binomial transform of Pell numbers A000129.
Floretion Algebra Multiplication Program, FAMP Code: (a(n)) = jesforseq[ + .5'i + .5i' + 2'jj' + .5'ij' + .5'ji' ]; A000004 = vesforseq.

Crossrefs

Cf. A086351, A027649, A007070 (inverse binomial transform), A081179, A163350 (binomial transform).

Programs

  • Magma
    [Floor(((1+Sqrt(2))*(3+Sqrt(2))^n+(1-Sqrt(2))*(3-Sqrt(2))^n)/2): n in [0..30]]; // Vincenzo Librandi, Oct 12 2011
  • Mathematica
    CoefficientList[Series[(1-x)/(7x^2-6x+1),{x,0,30}],x] (* or *) LinearRecurrence[{6,-7},{1,5},30] (* Harvey P. Dale, Dec 10 2017 *)

Formula

a(n) = A086351(n+1) - 3*A086351(n) (FAMP result); Inversion gives A027649 (SuperSeeker result); Inverse binomial transform of A007070 (SuperSeeker result);
From Al Hakanson (hawkuu(AT)gmail.com), Jul 25 2009: (Start)
a(n) = ((1+sqrt(2))*(3+sqrt(2))^n + (1-sqrt(2))*(3-sqrt(2))^n)/2 offset 0.
Third binomial transform of 1,2,2,4,4. (End)
a(n) = 6*a(n-1) - 7*a(n-2) for n > 1; a(0)=1, a(1)=5. - Philippe Deléham, Sep 19 2009
a(n) = A081179(n) + A086351(n). - Joseph M. Shunia, Sep 09 2019
a(n) = A081179(n+1)-A081179(n). - R. J. Mathar, Sep 11 2019

A110441 Triangular array formed by the Mersenne numbers.

Original entry on oeis.org

1, 3, 1, 7, 6, 1, 15, 23, 9, 1, 31, 72, 48, 12, 1, 63, 201, 198, 82, 15, 1, 127, 522, 699, 420, 125, 18, 1, 255, 1291, 2223, 1795, 765, 177, 21, 1, 511, 3084, 6562, 6768, 3840, 1260, 238, 24, 1, 1023, 7181, 18324, 23276, 16758, 7266, 1932, 308, 27, 1
Offset: 0

Author

Asamoah Nkwanta (nkwanta(AT)jewel.morgan.edu), Aug 08 2005

Keywords

Comments

This sequence factors A038255 into a product of Riordan arrays.
Subtriangle of the triangle given by (0, 3, -2/3, 2/3, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 19 2012
From Peter Bala, Jul 22 2014: (Start)
Let M denote the lower unit triangular array A130330 and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k x k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section. (End)
For 1<=k<=n, T(n,k) equals the number of (n-1)-length ternary words containing k-1 letters equal 2 and avoiding 01 and 02. - Milan Janjic, Dec 20 2016
The convolution triangle of the Mersenne numbers. - Peter Luschny, Oct 09 2022

Examples

			Triangle starts:
   1;
   3,  1;
   7,  6,  1;
  15, 23,  9,  1;
  31, 72, 48, 12,  1;
(0, 3, -2/3, 2/3, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, ...) begins:
  1
  0,  1
  0,  3,  1
  0,  7,  6,  1
  0, 15, 23,  9,  1
  0, 31, 72, 48, 12, 1. - _Philippe Deléham_, Mar 19 2012
With the arrays M(k) as defined in the Comments section, the infinite product M(0*)M(1)*M(2)*... begins
/ 1          \/1         \/1        \      / 1       \
| 3  1       ||0  1      ||0 1      |      | 3  1    |
| 7  3 1     ||0  3 1    ||0 0 1    |... = | 7  6 1  |
|15  7 3 1   ||0  7 3 1  ||0 0 3 1  |      |15 23 9 1|
|31 15 7 3 1 ||0 15 7 3 1||0 0 7 3 1|      |...      |
|...         ||...       ||...      |      |...      | - _Peter Bala_, Jul 22 2014
		

Crossrefs

Programs

  • Maple
    # Uses function PMatrix from A357368. Adds column 1, 0, 0, ... to the left.
    PMatrix(10, n -> 2^n - 1); # Peter Luschny, Oct 09 2022
  • Mathematica
    With[{n = 9}, DeleteCases[#, 0] & /@ CoefficientList[Series[1/(1 - (3 + y) x + 2 x^2), {x, 0, n}, {y, 0, n}], {x, y}]] // Flatten (* Michael De Vlieger, Apr 25 2018 *)

Formula

Riordan array M(n, k): (1/(1-3z+2z^2), z/(1-3z+2z^2)). Leftmost column M(n, 0) is the Mersenne numbers A000225, first column is A045618, second column is A055582, row sum is A007070 and diagonal sum is even-indexed Fibonacci numbers A001906.
T(n,k) = Sum_{j=0..n} C(j+k,k)C(n-j,k)2^(n-j-k). - Paul Barry, Feb 13 2006
From Philippe Deléham, Mar 19 2012: (Start)
G.f.: 1/(1-(3+y)*x+2*x^2).
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) -2*T(n-2,k), T(0,0) = 1, T(n,k) = 0 if k<0 or if k>n.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000225(n+1), A007070(n), A107839(n), A154244(n), A186446(n), A190975(n+1), A190979(n+1), A190869(n+1) for x = 0, 1, 2, 3, 4, 5, 6, 7 respectively. (End)
Recurrence: T(n+1,k+1) = Sum_{i=0..n-k} (2^(i+1) - 1)*T(n-i,k). - Peter Bala, Jul 22 2014
From Peter Bala, Oct 07 2019: (Start)
Recurrence for row polynomials: R(n,x) = (3 + x)*R(n-1,x) - 2*R(n-2,x) with R(0,x) = 1 and R(1,x) = 3 + x.
The row reverse polynomial x^n*R(n,1/x) is equal to the numerator polynomial of the finite continued fraction 1 + x/(1 + 2*x/(1 + ... + x/(1 + 2*x/(1)))) (with 2*n partial numerators). Cf. A116414. (End)

A111567 Binomial transform of A048654: generalized Pellian with second term equal to 4.

Original entry on oeis.org

1, 5, 18, 62, 212, 724, 2472, 8440, 28816, 98384, 335904, 1146848, 3915584, 13368640, 45643392, 155836288, 532058368, 1816560896, 6202126848, 21175385600, 72297288704, 246838383616, 842758957056, 2877359060992
Offset: 0

Author

Creighton Dement, Aug 06 2005

Keywords

Comments

Dropping the leading 1, this becomes the 4th row of the 2-shuffle Phi_2(W(sqrt(2))) of the Fraenkel-Kimberling publication. - R. J. Mathar, Aug 17 2009
Floretion Algebra Multiplication Program, FAMP Code: 1lesseq[K*J] with K = + .5'i + .5'j + .5k' + .5'kk' and J = + .5i' + .5j' + 2'kk' + .5'ki' + .5'kj'.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-2},{1,5},30] (* Harvey P. Dale, Jul 01 2016 *)
  • Maxima
    a[0]:1$
    a[1]:5$
    a[n]:=4*a[n-1]-2*a[n-2]$
    A111567(n):=a[n]$
    makelist(A111567(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = 4*a(n-1) - 2*a(n-2), a(0) = 1, a(1) = 5. Program "FAMP" returns: A111566(n) = A007052(n) - A006012(n) + a(n).
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: (1+x)/(1-4*x+2*x^2).
a(n) = A007070(n) + A007070(n-1). (End)
a(n) = ((2+sqrt(18))*(2+sqrt(2))^n + (2-sqrt(18))*(2-sqrt(2))^n)/4, offset 0. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
a(n) = ((5+sqrt(32))(2+sqrt(2))^n+(5-sqrt(32))(2-sqrt(2))^n)/2 offset 0. - Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009

Extensions

Typo in definition corrected by Klaus Brockhaus, Aug 09 2009

A111954 a(n) = A000129(n) + (-1)^n.

Original entry on oeis.org

1, 0, 3, 4, 13, 28, 71, 168, 409, 984, 2379, 5740, 13861, 33460, 80783, 195024, 470833, 1136688, 2744211, 6625108, 15994429, 38613964, 93222359, 225058680, 543339721, 1311738120, 3166815963, 7645370044, 18457556053, 44560482148, 107578520351
Offset: 0

Author

Creighton Dement, Aug 23 2005

Keywords

Comments

a(n) + a(n+1) = A001333(n+1). Inverse binomial transform of A007070 (with prepended 1). Inverse invert transform of A077995.
Floretion Algebra Multiplication Program, FAMP Code: -4ibasejseq[J*D] with J = - .25'i + .25'j + .5'k - .25i' + .25j' + .5k' - .5'kk' - .25'ik' - .25'jk' - .25'ki' - .25'kj' - .5e and D = + .5'i - .25'j + .25'k + .5i' - .25j' + .25k' - .5'ii' - .25'ij' - .25'ik' - .25'ji' - .25'ki' - .5e

Programs

  • Mathematica
    LinearRecurrence[{1,3,1},{1,0,3},40] (* Harvey P. Dale, Nov 24 2014 *)

Formula

a(n) = a(n-1) + 3*a(n-2) + a(n-3), n >= 3.
G.f.: (x-1)/((x+1)*(x^2+2*x-1)).
a(n) = (sqrt(2)/4)*((1 + sqrt(2))^n - (1 - sqrt(2))^n) + (-1)^n.
E.g.f.: cosh(x) - sinh(x) + exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, May 26 2024

A111566 a(n) = ((1+sqrt(8))*(2+sqrt(2))^n + (1-sqrt(8))*(2-sqrt(2))^n)/2.

Original entry on oeis.org

1, 6, 22, 76, 260, 888, 3032, 10352, 35344, 120672, 412000, 1406656, 4802624, 16397184, 55983488, 191139584, 652591360, 2228086272, 7607162368, 25972476928, 88675582976, 302757378048, 1033678346240, 3529198628864, 12049437822976, 41139354034176, 140458540490752
Offset: 0

Author

Creighton Dement, Aug 06 2005

Keywords

Comments

Binomial transform of A048655: generalized Pellian with second term equal to 5.
Floretion Algebra Multiplication Program, FAMP Code: 1vesseq[K*J] with K = + .5'i + .5'j + .5k' + .5'kk' and J = + .5i' + .5j' + 2'kk' + .5'ki' + .5'kj'.

Crossrefs

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+2*r)*(2+r)^n+(1-2*r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 27 2009
    
  • Mathematica
    LinearRecurrence[{4,-2},{1,6},30] (* Harvey P. Dale, Jan 31 2015 *)
  • PARI
    x='x+O('x^30); Vec((1+2*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Jan 27 2018

Formula

a(n) = 4*a(n-1) - 2*a(n-2), a(0) = 1, a(1) = 6.
Program "FAMP" returns: a(n) = A007052(n) - A006012(n) + A111567(n).
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: (1+2*x)/(1-4*x+2*x^2).
a(n) = A007070(n) + 2*A007070(n-1). (End)
a(n) = Sum_{k=0..n} A207543(n,k)*2^k. - Philippe Deléham, Feb 25 2012
a(n) = 4*A007070(n) - A007052(n+1). - Yuriy Sibirmovsky, Sep 13 2016
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x) + 2*sqrt(2)*sinh(sqrt(2)*x)). - Stefano Spezia, May 26 2024

Extensions

Edited by N. J. A. Sloane, Jul 27 2009 using new definition from Al Hakanson (hawkuu(AT)gmail.com)

A161941 a(n) = ((4+sqrt(2))*(2+sqrt(2))^n + (4-sqrt(2))*(2-sqrt(2))^n)/4.

Original entry on oeis.org

2, 5, 16, 54, 184, 628, 2144, 7320, 24992, 85328, 291328, 994656, 3395968, 11594560, 39586304, 135156096, 461451776, 1575494912, 5379076096, 18365314560, 62703106048, 214081795072, 730920968192, 2495520282624, 8520239194112
Offset: 0

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009

Keywords

Comments

Second binomial transform of A135530.

Crossrefs

Cf. A135530, A161944 (third binomial transform of A135530).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((4+r)*(2+r)^n+(4-r)*(2-r)^n)/4: n in [0..24] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Mathematica
    LinearRecurrence[{4,-2},{2,5},30] (* Harvey P. Dale, May 26 2012 *)
  • PARI
    x='x+O('x^30); Vec((2-3*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Jan 27 2018

Formula

a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 2; a(1) = 5.
G.f.: (2-3*x)/(1-4*x+2*x^2).
a(n) = 2*A007070(n) - 3*A007070(n-1). - R. J. Mathar, Oct 20 2017

Extensions

Edited and extended beyond a(4) by Klaus Brockhaus, Jul 01 2009

A265185 Non-vanishing traces of the powers of the adjacency matrix for the simple Lie algebra B_4: 2 * ((2 + sqrt(2))^n + (2 - sqrt(2))^n).

Original entry on oeis.org

4, 8, 24, 80, 272, 928, 3168, 10816, 36928, 126080, 430464, 1469696, 5017856, 17132032, 58492416, 199705600, 681837568, 2327939072, 7948081152, 27136446464, 92649623552, 316325601280, 1080003158016, 3687361429504, 12589439401984, 42983034748928
Offset: 0

Author

Tom Copeland, Dec 04 2015

Keywords

Comments

a(n) is the trace of the 2*n-th power of the adjacency matrix M for the simple Lie algebra B_4, given in the Damianou link. M = Matrix[row 1; row 2; row 3; row 4] = Matrix[0,1,0,0; 1,0,1,0; 0,1,0,2; 0,0,1,0]. Equivalently, the trace tr(M^(2*k)) is the sum of the 2*n-th powers of the eigenvalues of M. The eigenvalues are the zeros of the characteristic polynomial of M, which is det(x*I - M) = x^4 - 4*x^2 + 2 = A127672(4,x), and are (+-) sqrt(2 + sqrt(2)) and (+-) sqrt(2 - sqrt(2)), or the four unique values generated by 2*cos((2*n+1)*Pi/8). Compare with A025192 for B_3. The odd power traces vanish.
-log(1 - 4*x^2 + 2*x^4) = 8*x^2/2 + 24*x^4/4 + 80*x^6/6 + ... = Sum_{n>0} tr(M^k) x^k / k = Sum_{n>0} a(n) x^(2k) / 2k gives an aerated version of the sequence a(n), excluding a(0), and exp(-log(1 - 4*x + 2*x^2)) = 1 / (1 - 4*x + 2*x^2) is the e.g.f. for A007070.
As in A025192, the cycle index partition polynomials P_k(x[1],...,x[k]) of A036039 evaluated with the negated power sums, the aerated a(n), are P_2(0,-a(1)) = P_2(0,-8) = -8, P_4(0,-a(1),0,-a(2)) = P_4(0,-8,0,-24) = 48, and all other P_k(0,-a(1),0,-a(2),0,...) = 0 since 1 - 4*x^2 + 2*x^4 = 1 - 8*x^2/2! + 48*x^4/4! = det(I - x M) = exp(-Sum_{k>0} tr(M^k) x^k / k) = exp[P.(-tr(M),-tr(M^2),...)x] = exp[P.(0,-a(1),0,-a(2),...)x].
Because of the inverse relation between the Faber polynomials F_n(b1,b2,...,bn) of A263916 and the cycle index polynomials, F_n(0,-4,0,2,0,0,0,...) = tr(M^n) gives aerated a(n), excluding a(0). E.g., F_2(0,-4) = -2 * -4 = 8, F_4(0,-4,0,2) = -4 * 2 + 2 * (-4)^2 = 24, and F_6(0,-4,0,2,0,0) = -2*(-4)^3 + 6*(-4)*2 = 80.

Programs

  • Magma
    [Floor(2 * ((2 + Sqrt(2))^n + (2 - Sqrt(2))^n)): n in [0..30]]; // Vincenzo Librandi, Dec 06 2015
    
  • Mathematica
    4 LinearRecurrence[{4, -2}, {1, 2}, 30] (* Vincenzo Librandi, Dec 06 2015 and slightly modified by Robert G. Wilson v, Feb 13 2018 *)
  • PARI
    my(x='x+O('x^30)); Vec((4-8*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Feb 12 2018

Formula

a(n) = 2 * ((2 + sqrt(2))^n + (2 - sqrt(2))^n) = Sum_{k=0..3} 2^(2n) (cos((2k+1)*Pi/8))^(2n) = 2*2^(2n) (cos(Pi/8)^(2n) + cos(3*Pi/8)^(2n)) = 2 Sum_{k=0..1} (exp(i(2k+1)*Pi/8) + exp(-i*(2k+1)*Pi/8))^(2n).
E.g.f.: 2 * e^(2*x) * (e^(sqrt(2)*x) + e^(-sqrt(2)*x)) = 4*e^(2*x)*cosh(sqrt(2)*x) = 2*(exp(4*x*cos(Pi/8)^2) + exp(4*x cos(3*Pi/8)^2) ).
a(n) = 4*A006012(n) = 8*A007052(n-1) = 2*A056236(n).
G.f.: (4-8*x)/(1-4*x+2*x^2). - Robert Israel, Dec 07 2015
Note the preceding o.g.f. is four times that of A006012 and the denominator is y^4 * A127672(4,1/y) with y = sqrt(x). Compare this with those of A025192 and A189315. - Tom Copeland, Dec 08 2015

Extensions

More terms from Vincenzo Librandi, Dec 06 2015
Previous Showing 21-30 of 72 results. Next