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 11-15 of 15 results.

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)

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)

A287479 Expansion of g.f. (x + x^2)/(1 + 3*x^2).

Original entry on oeis.org

0, 1, 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
Offset: 0

Views

Author

Keywords

Comments

This is the inverse binomial transform of A157241.
Successive differences of A157241 begin:
0, 1, 3, 3, -5, -21, -21, 43, 171, 171, ... = A157241
1, 2, 0, -8, -16, 0, 64, 128, 0, -512, ... = A088138
1, -2, -8, -8, 16, 64, 64, -128, -512, -512, ... = A138230
-3, -6, 0, 24, 48, 0, -192, -384, 0, 1536, ...
-3, 6, 24, 24, -48, -192, -192, 384, 1536, 1536, ...
9, 18, 0, -72, -144, 0, 576, 1152, 0, -4608, ...
9, -18, -72 -72, 144, 576, 576, -1152, -4608, -4608, ...
...
a(n) is the n-th term of the first column.
Successive differences of a(n) begin:
0, 1, 1, -3, -3, 9, 9, -27, -27, 81, ...
1, 0, -4, 0, 12, 0, -36, 0, 108, 0, ...
-1, -4, 4, 12, -12, -36, 36, 108, -108, -324, ...
-3, 8, 8, -24, -24, 72, 72, -216, -216, 648, ...
11, 0, -32, 0, 96, 0, -288, 0, 864, 0, ...
-11, -32, 32, 96, -96, -288, 288, 864, -864, -2592, ...
-21, 64, 64, -192, -192, 576, 576, -1728, -1728, 5184, ...
85, 0, -256, 0, 768, 0, -2304, 0, 6912, 0, ...
...
First column appears to be a subsequence of Jacobsthal numbers A001045 (the trisection A082311 is missing), second column is A104538, and third column is A137717.
a(n) = A128019(n-2) for n > 2. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Mathematica
    Join[{0}, LinearRecurrence[{0, -3}, {1, 1}, 40]]
    (* or, computation from b = A157241 : *)
    b[n_] := (Switch[Mod[n, 3], 0, (-1)^((n + 3)/3), 1, (-1)^((n + 5)/3), 2, (-1)^((n + 4)/3)*2]*2^n + 1)/3; tb = Table[b[n], {n, 0, 40}]; Table[ Differences[tb, n], {n, 0, 40}][[All, 1]]
  • PARI
    concat([0], Vec((x + x^2)/(1 + 3*x^2) + O(x^40))) \\ Felix Fröhlich, Oct 23 2018

Formula

a(n) = -3*a(n-2) for n > 2.
E.g.f.: (1 - cos(sqrt(3)*x) + sqrt(3)*sin(sqrt(3)*x))/3. - Stefano Spezia, Jul 15 2024

A231404 Integers n dividing the Lucas sequence u(n), where u(i) = 2*u(i-1) - 4*u(i-2) with initial conditions u(0)=0, u(1)=1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 15, 16, 18, 21, 24, 27, 30, 32, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 64, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 128, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 162, 165
Offset: 1

Views

Author

Thomas M. Bridge, Nov 08 2013

Keywords

Comments

The sequence consists of all nonnegative powers of 2, together with all positive multiples of 3. There are infinitely many pairs of consecutive integers in this sequence.

Examples

			For n=0,...,4 we have u(n)= 0,1,2,0,-8. Clearly n=1,2,3,4 are in the sequence.
		

Crossrefs

Cf. A088138 (Lucas sequence).
Equal to union of A008585 (multiples of 3) and A000079 (powers of 2).

Programs

  • Mathematica
    nn = 500; s = LinearRecurrence[{2, -4}, {1, 2}, nn]; t = {}; Do[If[Mod[s[[n]], n] == 0, AppendTo[t, n]], {n, nn}]; t (* T. D. Noe, Nov 08 2013 *)

A363092 a(n) = 4*a(n-1) - 8*a(n-2) with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, -4, -24, -64, -64, 256, 1536, 4096, 4096, -16384, -98304, -262144, -262144, 1048576, 6291456, 16777216, 16777216, -67108864, -402653184, -1073741824, -1073741824, 4294967296, 25769803776, 68719476736, 68719476736, -274877906944, -1649267441664, -4398046511104
Offset: 0

Views

Author

Stefano Spezia, May 19 2023

Keywords

References

  • Paul J. Nahin, An Imaginary Tale: The Story of sqrt(-1), Princeton University Press, Princeton, NJ. 1998, pp. 94-96.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-8},{1,1},29]

Formula

a(n) = 2^(3*n/2-1)*(2*cos(n*Pi/4) - sin(n*Pi/4)).
O.g.f.: (1 - 3*x)/(1 - 4*x + 8*x^2).
E.g.f.: exp(2*x)*(2*cos(2*x) - sin(2*x))/2.
a(n+1) = a(n) iff n is a multiple of 4.
Previous Showing 11-15 of 15 results.