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-10 of 10 results.

A157240 a(n) = A128018(n) + 1.

Original entry on oeis.org

2, -1, -7, -7, 17, 65, 65, -127, -511, -511, 1025, 4097, 4097, -8191, -32767, -32767, 65537, 262145, 262145, -524287, -2097151, -2097151, 4194305, 16777217, 16777217, -33554431, -134217727, -134217727, 268435457, 1073741825
Offset: 0

Views

Author

Creighton Dement, Feb 25 2009

Keywords

Comments

Generating floretion is Y = .5('i + 'j + 'k + i' + j' + k') + ee. ("tes"). Note: A current conjecture is that if X is a floretion for which 4*tes(X^n) is an integer for all n, then X+sigma(X) also has this property. "sigma" is the uniquely defined projection operator which "flips the arrows" of a floretion (i.e. sigma('i) = i', sigma('j) = j', etc.). Taking X = .5('i + 'j + 'k + ee), then tesseq(X) = [ -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, ...] is an integer sequence, thus by the conjecture 4*tes(Y^n) = 4*tes((X+sigma)^n) should also be an integer sequence for all n.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-6,4},{2,-1,-7},40] (* Harvey P. Dale, May 30 2021 *)
  • PARI
    Vec((2 - 7*x + 8*x^2) / ((1 - x)*(1 - 2*x + 4*x^2)) + O(x^35)) \\ Colin Barker, May 22 2019

Formula

G.f.: (2-7*x+8*x^2) / ((1-x)*(4*x^2-2*x+1)).
From Colin Barker, May 22 2019: (Start)
a(n) = (2 + (1-i*sqrt(3))^(1+n) + (1+i*sqrt(3))^(1+n)) / 2 where i=sqrt(-1).
a(n) = 3*a(n-1) - 6*a(n-2) + 4*a(n-3) for n>2.
(End)
a(n) = A138230(n+1)+1. - R. J. Mathar, Sep 11 2019

A128014 Central binomial coefficients C(2n,n) repeated.

Original entry on oeis.org

1, 1, 2, 2, 6, 6, 20, 20, 70, 70, 252, 252, 924, 924, 3432, 3432, 12870, 12870, 48620, 48620, 184756, 184756, 705432, 705432, 2704156, 2704156, 10400600, 10400600, 40116600, 40116600, 155117520, 155117520, 601080390, 601080390
Offset: 0

Views

Author

Paul Barry, Feb 11 2007

Keywords

Comments

Binomial transform is A097893. Hankel transform is A128017.
Hankel transform of a(n+1) is A128018. - Paul Barry, Nov 23 2009
Number of 2n-bead balanced binary necklaces that are equivalent to their reverse. - Andrew Howroyd, Sep 29 2017
Number of ballot sequences of length n in which the vote is tied or decided by 1 vote. - Nachum Dershowitz, Aug 12 2020
Number of binary strings of length n that are abelian squares. - Michael S. Branicky, Dec 21 2020

Crossrefs

Programs

  • Haskell
    a128014 = a000984 . flip div 2
    -- Reinhard Zumkeller, Nov 14 2014
  • Mathematica
    (1+x)/Sqrt[1-4x^2] + O[x]^34 // CoefficientList[#, x]& (* Jean-François Alcover, Oct 07 2017 *)
    With[{cb=Table[Binomial[2n,n],{n,0,20}]},Riffle[cb,cb]] (* Harvey P. Dale, Feb 17 2020 *)

Formula

G.f.: (1+x)/sqrt(1-4*x^2).
a(n) = C(n,n/2)*(1+(-1)^n)/2 + C(n-1,(n-1)/2)*(1-(-1)^n)/2.
a(n) = (1/Pi)*Integral_{x=-2..2} x^n*(1+x)/(x*sqrt(4-x^2)), as moment sequence.
E.g.f. of a(n+1): Bessel_I(0,2*x)+2*Bessel_I(1,2*x). - Paul Barry, Mar 26 2010
n*a(n) +(n-2)*a(n-1) +4*(-n+1)*a(n-2) +4*(-n+3)*a(n-3) = 0. - R. J. Mathar, Nov 26 2012
a(n) = 2^n*Product_{k=0..n-1} ((k/n+1/n)/2)^((-1)^k). - Peter Luschny, Dec 03 2013
From Reinhard Zumkeller, Nov 14 2014: (Start)
a(n) = A000984(floor(n/2)).
a(n) = A249095(n,n) = A249308(n) / 2^n. (End)

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

Original entry on oeis.org

1, 1, -2, -8, -8, 16, 64, 64, -128, -512, -512, 1024, 4096, 4096, -8192, -32768, -32768, 65536, 262144, 262144, -524288, -2097152, -2097152, 4194304, 16777216, 16777216, -33554432, -134217728, -134217728, 268435456, 1073741824, 1073741824, -2147483648, -8589934592
Offset: 0

Views

Author

Paul Barry, Mar 06 2008

Keywords

Comments

In general, the expansion of (1-x)/(1 - 2*x + (m+1)*x^2) has general term given by a(n) = Sum_{k=0..floor(n/2)} binomial(n,2*k)*(-m)^k = ((1+sqrt(-m))^n + (1-sqrt(-m))^n)/2.
Binomial transform of [1, 0, -3, 0, 9, 0, -27, 0, 81, 0, ...] = powers of -3 with interpolated zeros. - Philippe Deléham, Dec 02 2008

Crossrefs

Programs

  • Magma
    [2^n*Evaluate(ChebyshevFirst(n), 1/2): n in [0..30]]; // G. C. Greubel, Feb 11 2023
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2x+4x^2),{x,0,30}],x] (* or *) LinearRecurrence[{2,-4},{1,1},30] (* Harvey P. Dale, Nov 11 2014 *)
  • SageMath
    [2^n*chebyshev_T(n,1/2) for n in range(31)] # G. C. Greubel, Feb 11 2023

Formula

From Philippe Deléham, Nov 14 2008: (Start)
a(n) = 2*a(n-1) - 4*a(n-2), a(0)=1, a(1)=1.
a(n) = Sum_{k=0..n} A098158(n,k)*(-3)^(n-k). (End)
a(n) = Sum_{k=0..n} A124182(n,k)*(-4)^(n-k). - Philippe Deléham, Nov 15 2008
a(n) = 2^n*cos(Pi*n/3). - Richard Choulet, Nov 19 2008
a(n) = -8*a(n-3). - Paul Curtz, Apr 22 2011
From Sergei N. Gladkovskii, Jul 27 2012: (Start)
G.f.: G(0) where G(k) = 1 + x/(1 + 2*x/(1 - 2*x - 4*x/(4*x + 1/G(k+1)))); (continued fraction).
E.g.f.: exp(x)*cos(sqrt(3)*x) = G(0) where G(k) = 1 + x/(3*k+1 + 2*x*(3*k+1)/(3*k+2 - 2*x - 4*x*(3*k+2)/(4*x + 3*(k+1)/G(k+1)))); (continued fraction). (End)
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(3*k+1)/(x*(3*k+4) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n) = A088138(n+1) - A088138(n). - R. J. Mathar, Mar 04 2018
a(n) = (-1)^n*A104537(n). - R. J. Mathar, May 21 2019
a(n) = 2^(n-1)*A087204(n). - G. C. Greubel, Feb 11 2023
Sum_{n>=0} 1/a(n) = 4/3. - Amiram Eldar, Feb 14 2023

A168175 Expansion of 1/(1 - 4*x + 7*x^2).

Original entry on oeis.org

1, 4, 9, 8, -31, -180, -503, -752, 513, 7316, 25673, 51480, 26209, -255524, -1205559, -3033568, -3695359, 6453540, 51681673, 161551912, 284435937, 6880364, -1963530103, -7902282960, -17864421119, -16141703756, 60484132809
Offset: 0

Views

Author

Roger L. Bagula, Nov 19 2009

Keywords

Comments

Also the coefficient of i of Q^(n+1), Q being the quaternion 2+i+j+k. The real part of the quaternion power is A213421, see also A087455, A088138, A128018. - Stanislav Sykora, Jun 11 2012
a(n)*(-1)^n gives the coefficient c(7^n) of (eta(z^6))^4, a modular cusp form of weight 2, when expanded in powers of q = exp(2*Pi*i*z), Im(z) > 0, assuming alpha-multiplicativity (but not for primes 2 and 3) with alpha(x) = x (weight 2) and input c(7) = -4. Eta is the Dedekind function. See the Apostol reference, p. 138, eq. (54) for alpha-multiplicativity and p. 130, eq. (39) with k=2. See also A000727(n) = b(n) where c(7^n) = b((7^n-1)/6) = b(A023000(n)), n >= 0. Proof: The alpha-multiplicity with alpha(1) = 1 and c(1) = 1 leads from p^n = p^(n-1)*p to the recurrence c_n = c*c_(n-1) - a*c(n-2), with c_n = c(p^n), c = c(p) and a = alpha(p). Inputs are c_{-1} = 0 and c_0 = c(1) = 1. This gives the polynomial c_n = sqrt(a)^n * S(n,c/sqrt(a)), with Chebyshev's S-polynomials (A049310). See the Apostol reference, Exercise 6., p. 139. Here p = 7, c = -4. - Wolfdieter Lang, Apr 27 2016

Examples

			G.f. = 1 + 4*x + 9*x^2 + 8*x^3 - 31*x^4 - 180*x^5 - 503*x^6 - 752*x^7 + ... - _Michael Somos_, Feb 23 2020
		

References

  • Tom M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990, pp. 130, 138 - 139.

Crossrefs

Programs

  • Magma
    I:=[1,4]; [n le 2 select I[n] else 4*Self(n-1)-7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 25 2012
    
  • Mathematica
    CoefficientList[Series[1/(1-4x+7x^2),{x,0,30}],x] (* or *) LinearRecurrence[ {4,-7},{1,4},30] (* Harvey P. Dale, Nov 28 2014 *)
  • PARI
    {a(n) = my(s=1, t=1); if( n<0, n=-2-n; s=-1; t=1/7); s * t^(n+1) * polcoeff(1 / (1 - 4*x + 7*x^2) + x * O(x^n), n)}; /* Michael Somos, Feb 23 2020 */

Formula

a(n) = (1/2 - i/sqrt(3))*(2 + i*sqrt(3))^n + (1/2 + i/sqrt(3))*(2 - i*sqrt(3))^n (Binet formula), where i is the imaginary unit.
a(n) = 4*a(n-1) - 7*a(n-2).
a(n) = sqrt(7)^n * S(n, 4/sqrt(7)), n >= 0, with Chebyshev's S polynomials (A049310). - Wolfdieter Lang, Apr 27 2016
E.g.f.: (2*sqrt(3)*sin(sqrt(3)*x) + 3*cos(sqrt(3)*x))*exp(2*x)/3. - Ilya Gutkovskiy, Apr 27 2016
a(n) = (-1) * 7^(n+1) * a(-2-n) for all n in Z. - Michael Somos, Feb 23 2020

A213421 Real part of Q^n, Q being the quaternion 2+i+j+k.

Original entry on oeis.org

1, 2, 1, -10, -47, -118, -143, 254, 2017, 6290, 11041, 134, -76751, -307942, -694511, -622450, 2371777, 13844258, 38774593, 58188566, -38667887, -561991510, -1977290831, -3975222754, -2059855199, 19587138482
Offset: 0

Views

Author

Stanislav Sykora, Jun 11 2012

Keywords

Crossrefs

Programs

  • Maple
    #A213421
    seq(simplify(1/2*((2+I*sqrt(3))^n+(2-I*sqrt(3))^n)), n = 0 .. 25); # Peter Bala, Mar 29 2015
  • PARI
    QuaternionToN(a,b,c,d,nmax) = {local (C);C = matrix(nmax+1,4);C[1,1]=1;for(n=2,nmax+1,C[n,1]=a*C[n-1,1]-b*C[n-1,2]-c*C[n-1,3]-d*C[n-1,4];C[n,2]=b*C[n-1,1]+a*C[n-1,2]+d*C[n-1,3]-c*C[n-1,4];C[n,3]=c*C[n-1,1]-d*C[n-1,2]+a*C[n-1,3]+b*C[n-1,4];C[n,4]=d*C[n-1,1]+c*C[n-1,2]-b*C[n-1,3]+a*C[n-1,4];);return (C);}
    Q=QuaternionToN(2,1,1,1,1000);
    for(n=1,#Q[,1],write("A213421.txt",n-1," ",Q[n,1]));

Formula

Conjecture: G.f. (1-2x)/(1-4x+7x^2). a(n) = A168175(n)-2*A168175(n-1). - R. J. Mathar, Jun 25 2012
From Peter Bala, Mar 29 2015: (Start)
The above o.g.f. is correct; this is the Lucas sequence V_n(4,7).
a(n) = Re( (2 + sqrt(3)*i)^n )= 1/2*( (2 + sqrt(3)*i)^n + (2 - sqrt(3)*i)^n ).
a(n) = 1/2 * trace( [ 2 + i, 1 + i; -1 + i, 2 - i ]^n ) = 1/2 * trace( [ 2 , sqrt(3)*i ; sqrt(3)*i, 2 ]^n ).
a(n) = 4*a(n-1) - 7*a(n-2) with a(0) = 1, a(1) = 2. (End)

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

Original entry on oeis.org

1, -3, -3, 9, 9, -27, -27, 81, 81, -243, -243, 729, 729, -2187, -2187, 6561, 6561, -19683, -19683, 59049, 59049, -177147, -177147, 531441, 531441, -1594323, -1594323, 4782969, 4782969, -14348907, -14348907, 43046721, 43046721, -129140163, -129140163, 387420489, 387420489
Offset: 0

Views

Author

Paul Barry, Feb 11 2007

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - 3x)/(1 + 3*x^2),{x,0,40}],x] (* Stefano Spezia, Dec 31 2022 *)
    LinearRecurrence[{0,-3},{1,-3},40] (* Harvey P. Dale, Jun 09 2025 *)

Formula

a(n) = 3^floor((n+1)/2)*(-1)^C(n+1,2).
Binomial transform is A128018.
E.g.f.: cos(sqrt(3)*x) - sqrt(3)*sin(sqrt(3)*x). - Stefano Spezia, Dec 31 2022

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

Original entry on oeis.org

0, 1, 3, 3, -5, -21, -21, 43, 171, 171, -341, -1365, -1365, 2731, 10923, 10923, -21845, -87381, -87381, 174763, 699051, 699051, -1398101, -5592405, -5592405, 11184811, 44739243, 44739243, -89478485, -357913941
Offset: 0

Views

Author

Creighton Dement, Feb 25 2009

Keywords

Comments

Generating floretion is Y = .5('i + 'j + 'k + i' + j' + k') + ee. ("ibasek"). This is the same floretion which generates A157240.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x/((1-x)(4x^2-2x+1)),{x,0,40}],x] (* or *) LinearRecurrence[{3,-6,4},{0,1,3},40] (* Harvey P. Dale, Oct 27 2013 *)
    Table[1/9 (3 + (-1)^Floor[1/3 (-2 + n)] 2^(4 + 3 Floor[1/3 (-2 + n)]) + (-1)^Floor[1/3 (-1 + n)] 2^(3 + 3 Floor[1/3 (-1 + n)])), {n, 0, 500}] (* John M. Campbell, Dec 23 2016 *)
  • PARI
    concat(0, Vec(x / ((1 - x)*(1 - 2*x + 4*x^2)) + O(x^40))) \\ Colin Barker, May 22 2019

Formula

a(n+1) - a(n) = A088138(n+1).
a(n+1) = Sum_{k=0..n} A120987(n,k)*(-1)^(n-k). - Philippe Deléham, Oct 25 2011
G.f.: 2*x-2*x/(G(0) + 1) where G(k)= 1 + 2*(2*k+3)*x/(2*k+1 - 2*x*(k+2)*(2*k+1)/(2*x*(k+2) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 23 2012
a(n) = 1/9*(3 + (-1)^floor((n-2)/3)*2^(4+3*floor((n-2)/3)) + (-1)^floor((n-1)/3)*2^(3+3*floor((n-1)/3))). - John M. Campbell, Dec 23 2016
From Colin Barker, May 22 2019: (Start)
a(n) = (2 - (1+i*sqrt(3))^(1+n) + i*(1-i*sqrt(3))^n*(i+sqrt(3))) / 6 where i=sqrt(-1).
a(n) = 3*a(n-1) - 6*a(n-2) + 4*a(n-3) for n>2.
(End)

A103970 Expansion of (1 - sqrt(1 - 4*x - 12*x^2))/(2*x).

Original entry on oeis.org

1, 4, 8, 32, 128, 576, 2688, 13056, 65024, 330752, 1710080, 8962048, 47497216, 254132224, 1370849280, 7447117824, 40707293184, 223731253248, 1235630948352, 6853893292032, 38166664839168, 213288826699776, 1195775593807872, 6723691157127168, 37908469021409280, 214260335517892608, 1213784937073737728, 6890689428042285056
Offset: 0

Views

Author

Paul Barry, Feb 23 2005

Keywords

Comments

Image of c(x), the g.f. of the Catalan numbers A000108 under the mapping g(x) -> (1+3x)g(x(1+3x)). In general, the image of the Catalan numbers under the mapping g(x) -> (1+i*x)g(x(1+i*x)) is given by a(n) = Sum_{k=0..n} i^(n-k)*C(k)*C(k+1,n-k).
Hankel transform is 4^C(n+1,2)*A128018(n). [Paul Barry, Nov 20 2009]
By following L. Comtet [Analyse Combinatoire Tomes 1 et 2, PUF, Paris 1970], we also obtain (n+1)*C(n) - 2*a*(2*n-1)*C(n-1) + 4*(n-2)*(a^2-b)*C(n-2) = 0. In the present case, we also have the asymptotic result: a(n) ~ sqrt(4/3)*2^(n-1)*3^(n+1)/sqrt(Pi*n^3) for large n. - Richard Choulet, Dec 17 2009

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 35); Coefficients(R!( (1-Sqrt(1-4*x-12*x^2))/(2*x) )); // G. C. Greubel, Mar 16 2019
    
  • Maple
    n:=30:a(0):=1:a(1):=4: k:=1: for k from 1 to n do a(k+1):=sum('a(p)*a(k-p)','p'=0..k):od:seq(a(k),k=0..n); # Richard Choulet, Dec 17 2009
    taylor(((1-(1-4*z-12*z^2)^0.5)/(2*z)),z=0,32); # Richard Choulet, Dec 17 2009
  • Mathematica
    CoefficientList[Series[(1 - Sqrt[1-4x-12x^2])/(2x), {x, 0, 33}], x] (* Vincenzo Librandi, Aug 18 2017 *)
  • PARI
    my(x='x+O('x^35)); Vec((1-sqrt(1-4*x-12*x^2))/(2*x)) \\ G. C. Greubel, Mar 16 2019
    
  • Sage
    ((1-sqrt(1-4*x-12*x^2))/(2*x)).series(x, 35).coefficients(x, sparse=False) # G. C. Greubel, Mar 16 2019

Formula

G.f.: (1 - sqrt(1-4*x*(1+3*x)))/(2*x).
a(n) = Sum_{k=0..n} 3^(n-k)*C(k)*C(k+1, n-k).
D-finite with recurrence: (n+1)*a(n) = 2*(2*n-1)*a(n-1) + 12*(n-2)*a(n-2). - Richard Choulet, Dec 17 2009

A138340 Expansion of (1-8x)/(1-4x+16x^2).

Original entry on oeis.org

1, -4, -32, -64, 256, 2048, 4096, -16384, -131072, -262144, 1048576, 8388608, 16777216, -67108864, -536870912, -1073741824, 4294967296, 34359738368, 68719476736, -274877906944, -2199023255552, -4398046511104, 17592186044416
Offset: 0

Views

Author

Paul Barry, Mar 15 2008

Keywords

Comments

abs(a(n)) = 2^A047267(n).

Programs

  • Mathematica
    CoefficientList[Series[(1-8x)/(1-4x+16x^2),{x,0,30}],x] (* or *) LinearRecurrence[{4,-16},{1,-4},30] (* Harvey P. Dale, Sep 30 2014 *)

Formula

a(n) = 2*4^n(cos(Pi*(n+1)/3) - sqrt(3)*sin(Pi*(n+1))/3).
a(n) = 4^n*Sum_{k=0..n} A121314(n,k)*(-1)^k*3^(n-k). - Philippe Deléham, Nov 01 2008
a(n) = A128018(n)*2^n. - Philippe Deléham, Nov 14 2008
a(n) = 4*a(n-1) - 16*a(n-2); a(0)=1, a(1)=-4. - Harvey P. Dale, Sep 30 2014

A266046 Real part of Q^n, where Q is the quaternion 2 + j + k.

Original entry on oeis.org

1, 2, 2, -4, -28, -88, -184, -208, 272, 2336, 7712, 16832, 21056, -16768, -193408, -673024, -1531648, -2088448, 836096, 15875072, 58483712, 138684416, 203835392, -16764928, -1290072064, -5059698688, -12498362368, -19635257344, -3550855168, 103608123392
Offset: 0

Views

Author

Stanislav Sykora, Dec 20 2015

Keywords

Comments

In general, given a quaternion Q = r+u*i+v*j+w*k with integer coefficients [r,u,v,w], its powers Q^n = R(n)+U(n)*i+V(n)*j+W(n)*k define four integer sequences R(n),U(n),V(n),W(n). The process can be also transcribed as a four-term, first order recurrence for the elements of the four sequences. Since |Q^n| = |Q|^n, we have, for any n, R(n)^2+U(n)^2+V(n)^2+W(n)^2 = (L^2)^n, where L^2 = r^2+u^2+v^2+w^2 is a constant. The normalized sequence Q^n/L^n describes a unitary quaternion undergoing stepwise rotations by the angle phi = arctan(sqrt(u^2+v^2+w^2)/r). Consequently, the four sequences exhibit sign changes with the mean period of P = 2*Pi/phi steps.
When Q has a symmetry with respect to permutations and/or inversions of the imaginary axes, the four sequences become even more interdependent.
In this particular case Q = 2+j+k, and Q^n = a(n)+b(n)*(j+k), where b(n) is the sequence A190965. The first-order recurrence reduces to two-terms, namely a(n+1)=2*a(n)-2*b(n), b(n+1)=2*b(n)+a(n). This implies further a single-term, second order recurrence a(n+2)=4*a(n+1)-6*a(n), shared by both a(n) and b(n), but with different starting terms. The mean period of sign changes is P = 10.208598624... steps.
The following OEIS sequences can be also cast as quaternion powers:
Q = 1+i+j+k: Q^n = A128018(n)+A088138(n)*(i+j+k), P = 6.000,
Q = 1+j+k : Q^n = A087455(n)+A088137(n)*(j+k), P = 6.577071086...,
Q = 2+i+j+k: Q^n = A213421(n)+A168175(n)*(i+j+k), P = 8.803377735...

Crossrefs

Cf. A087455 (Inv. Bin. Transf.), A088137, A088138, A128018, A168175, A190965, A213421.

Programs

  • Magma
    [n le 2 select n else  4*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Dec 22 2015
  • Mathematica
    LinearRecurrence[{4, -6}, {1, 2}, 30] (* Bruno Berselli, Dec 22 2015 *)
  • PARI
    \\ A simple function to generate quaternion powers:
    QuaternionToN(r, u, v, w, nmax) = {local (M); M = matrix(nmax+1, 4); M[1, 1]=1; for(n=2, nmax+1, M[n, 1]=r*M[n-1, 1]-u*M[n-1, 2]-v*M[n-1, 3]-w*M[n-1, 4]; M[n, 2]=u*M[n-1, 1]+r*M[n-1, 2]+w*M[n-1, 3]-v*M[n-1, 4]; M[n, 3]=v*M[n-1, 1]-w*M[n-1, 2]+r*M[n-1, 3]+u*M[n-1, 4]; M[n, 4]=w*M[n-1, 1]+v*M[n-1, 2]-u*M[n-1, 3]+r*M[n-1, 4]; ); return (M); }
    a=QuaternionToN(2, 0, 1, 1, 1000)[,1]; \\ Select the real parts
    
  • PARI
    Vec((1-2*x)/(1-4*x+6*x^2) + O(x^40)) \\ Colin Barker, Dec 21 2015
    

Formula

a(n)^2 + 2*A190965(n)^2 = 6^n.
From Colin Barker, Dec 21 2015: (Start)
a(n) = ((2-i*sqrt(2))^n+(2+i*sqrt(2))^n)/2, where i=sqrt(-1).
a(n) = 4*a(n-1) - 6*a(n-2) for n>1.
G.f.: (1-2*x) / (1-4*x+6*x^2). (End)
Showing 1-10 of 10 results.