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

A190958 a(n) = 2*a(n-1) - 10*a(n-2), with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, -6, -32, -4, 312, 664, -1792, -10224, -2528, 97184, 219648, -532544, -3261568, -1197696, 30220288, 72417536, -157367808, -1038910976, -504143872, 9380822016, 23803082752, -46202054656, -330434936832, -198849327104, 2906650714112, 7801794699264
Offset: 0

Views

Author

Keywords

Comments

For the difference equation a(n) = c*a(n-1) - d*a(n-2), with a(0) = 0, a(1) = 1, the solution is a(n) = d^((n-1)/2) * ChebyshevU(n-1, c/(2*sqrt(d))) and has the alternate form a(n) = ( ((c + sqrt(c^2 - 4*d))/2)^n - ((c - sqrt(c^2 - 4*d))/2)^n )/sqrt(c^2 - 4*d). In the case c^2 = 4*d then the solution is a(n) = n*d^((n-1)/2). The generating function is x/(1 - c*x + d^2) and the exponential generating function takes the form (2/sqrt(c^2 - 4*d))*exp(c*x/2)*sinh(sqrt(c^2 - 4*d)*x/2) for c^2 > 4*d, (2/sqrt(4*d - c^2))*exp(c*x/2)*sin(sqrt(4*d - c^2)*x/2) for 4*d > c^2, and x*exp(sqrt(d)*x) if c^2 = 4*d. - G. C. Greubel, Jun 10 2022

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
    
  • Mathematica
    LinearRecurrence[{2,-10}, {0,1}, 50]
  • PARI
    a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • SageMath
    [lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022

Formula

G.f.: x / ( 1 - 2*x + 10*x^2 ). - R. J. Mathar, Jun 01 2011
E.g.f.: (1/3)*exp(x)*sin(3*x). - Franck Maminirina Ramaharo, Nov 13 2018
a(n) = 10^((n-1)/2) * ChebyshevU(n-1, 1/sqrt(10)). - G. C. Greubel, Jun 10 2022
a(n) = (1/3)*10^(n/2)*sin(n*arctan(3)) = Sum_{k=0..floor(n/2)} (-1)^k*3^(2*k)*binomial(n,2*k+1). - Gerry Martens, Oct 15 2022

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)

A190965 a(n) = 4*a(n-1) - 6*a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 10, 16, 4, -80, -344, -896, -1520, -704, 6304, 29440, 79936, 143104, 92800, -487424, -2506496, -7101440, -13366784, -10858496, 36766720, 212217856, 628271104, 1239777280, 1189482496, -2680733696, -17859829760, -55354916864, -114260688896
Offset: 0

Views

Author

Keywords

Comments

For the quaternion Q = 2+j+k, Q^n = r(n) + a(n)*(j+k). The sequence of real-parts r(n) is A266046. - Stanislav Sykora, Dec 20 2015

Crossrefs

Cf. A190958 (index to generalized Fibonacci sequences).
Cf. A088137 (Inv. Bin. Trans.), A168175, A213421, A266046.

Programs

  • Magma
    [n le 2 select n-1 else 4*Self(n-1) -6*Self(n-2): n in [1..41]]; // G. C. Greubel, Jan 10 2024
    
  • Maple
    w := I*sqrt(2): a := n -> (w/4)*((2 - w)^n - (2 + w)^n):
    seq(simplify(a(n)), n = 0..20);  # (after Taras Goy), Peter Luschny, Jan 03 2025
  • Mathematica
    LinearRecurrence[{4,-6}, {0,1}, 50]
  • PARI
    a(n)=([0,1;0,0]*[0,-6;1,4]^n)[1,1] \\ Charles R Greathouse IV, May 31 2011
    
  • SageMath
    A190965=BinaryRecurrenceSequence(4,-6,0,1)
    [A190965(n) for n in range(41)] # G. C. Greubel, Jan 10 2024

Formula

G.f.: x/(1-4*x+6*x^2). - Philippe Deléham, Oct 12 2011
2*a(n)^2 + A266046(n)^2 = 6^n. - Stanislav Sykora, Dec 20 2015
From G. C. Greubel, Jan 10 2024: (Start)
a(n) = 6^((n-1)/2)*ChebyshevU(n-1, sqrt(2/3)).
E.g.f.: (1/sqrt(2))*exp(2*x)*sin(sqrt(2)*x). (End)
a(n) = (i*sqrt(2)/4)*((2 - i*sqrt(2))^n - (2 + i*sqrt(2))^n), where i = sqrt(-1). - Taras Goy, Jan 03 2025

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)

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

Original entry on oeis.org

1, 2, -9, -44, 29, 630, 883, -6424, -24327, 34858, 385967, 318780, -4380011, -12904162, 31131819, 230017744, 55321841, -2879586990, -6478357913, 24477915044, 133174482957, -51863929658, -1834996137757, -2995761189960, 17863427410921, 74671750291322
Offset: 0

Views

Author

Wolfdieter Lang, Apr 27 2016

Keywords

Comments

a(n) gives the coefficient c(13^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 (not valid for p = 2 and 3) with alpha(x) = x (weight 2) and input c(13) = +2. 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 where a(n)=c(13^n) = A000727((13^n-1)/6)=A000727(2*A091030(n)), n >= 0. For the proof that alpha-multiplicativity leads to the recurrence involving Chebyshev's S polynomials see a comment on A168175, and the Apostol reference, Exercise 6., p. 139.

Examples

			a(2) = c(13^2) = A000727(2*A091030(2)) =
A000727(28) = -9.
		

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,2]; [n le 2 select I[n] else 2*Self(n-1)-13*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 25 2016
  • Mathematica
    CoefficientList[Series[1/(1 - 2 x + 13 x^2), {x, 0, 25}], x] (* Michael De Vlieger, Apr 27 2016 *)
    LinearRecurrence[{2, -13}, {1, 2}, 30] (* Vincenzo Librandi, Nov 25 2016 *)
  • PARI
    Vec(1/(1-2*x+13*x^2) + O(x^99)) \\ Altug Alkan, Apr 28 2016
    

Formula

G.f.: 1/(1 - 2*x + 13*x^2).
a(n) = 2*a(n-1) - 13*a(n-2), a(-1) = 0, a(0) = 1.
a(n) = sqrt(13)^n * S(n, 2/sqrt(13)), n >= 0, with Chebyshev's S polynomials (A049310).
a(n) = (Ap^(n+1) - Am^(n+1))/(Ap - Am) with Ap:= 1 + 2*sqrt(3)*i and Am = 1 - 2*sqrt(3)*i, (Binet - de Moivre formula), where i is the imaginary unit.
E.g.f.: (sqrt(3)*sin(2*sqrt(3)*x) + 6*cos(2*sqrt(3)*x))*exp(x)/6. - Ilya Gutkovskiy, Apr 27 2016

A332332 Coefficients of L-series for elliptic curve "33a1": y^2 + x*y = x^3 + x^2 - 11*x.

Original entry on oeis.org

1, 1, -1, -1, -2, -1, 4, -3, 1, -2, 1, 1, -2, 4, 2, -1, -2, 1, 0, 2, -4, 1, 8, 3, -1, -2, -1, -4, -6, 2, -8, 5, -1, -2, -8, -1, 6, 0, 2, 6, -2, -4, 0, -1, -2, 8, 8, 1, 9, -1, 2, 2, 6, -1, -2, -12, 0, -6, -4, -2, 6, -8, 4, 7, 4, -1, -4, 2, -8, -8, 0, -3, -14, 6
Offset: 1

Views

Author

Michael Somos, Feb 23 2020

Keywords

Examples

			G.f. = x + x^2 - x^3 - x^4 - 2*x^5 - x^6 + 4*x^7 - 3*x^8 + x^9 + ...
		

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma0(33), 2), 75); A[2] + A[3] - A[4] - A[5] - A[6];
    
  • PARI
    {a(n) = if( n<1, 0, ellak( ellinit( [1, 1, 0, -11, 0], 1), n))};
    
  • PARI
    {a(n) = my(A, t1, t3); if( n<1, 0, n--; A = x * O(x^n); t1 = eta(x + A) * eta(x^11 + A); t3 = x * eta(x^3 + A) * eta(x^33 + A); polcoeff( t1^2 + 3*t1*t3 + 3*t3^2, n))};
    
  • Sage
    def a(n):
        return EllipticCurve("33a1").an(n)  # Robin Visser, Sep 30 2023

Formula

Expansion of eta(q)^2*eta(q^11)^2 + 3*eta(q)*eta(q^3)*eta(q^11)*eta(q^33) + 3*eta(q^3)^2*eta(q^33)^2 in powers of q.
G.f. is a period 1 Fourier series which satisfies f(-1 / (33 t)) = 33 (t/i)^2 f(t) where q = exp(2 Pi i t).
a(n) is multiplicative with a(3^n) = (-1)^n, a(11^n) = 1. a(2^n) = A107920(n+1). a(7^n) = A168175(n).

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

Original entry on oeis.org

1, 7, 21, 35, -7, -273, -1043, -2261, -1743, 8855, 47621, 128499, 180649, -176897, -1972131, -6650245, -12796063, -4632537, 71042293, 316596931, 769091673, 860188175, -1942889011, -13792873269, -41571269999, -69734967113, 12059021541, 536380855955, 2061110273033, 4489775100447
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 13 2016

Keywords

Comments

Satisfies of recurrence relations system a(n) = 3*a(n-1) + 2*b(n-1), b(n) = b(n-1) - 2*a(n-1), a(0)=1, b(0)=2.
More generally, for the recurrence relations system a(n) = 3*a(n-1) + 2*b(n-1), b(n) = b(n-1) - 2*a(n-1), a(0)=k, b(0)=m solution is a(n) = ((2 + i*sqrt(3))^n*((sqrt(3) - i)*k - 2*i*m) + (2 - i*sqrt(3))^n*((sqrt(3) + i)*k + 2*i*m))/(2*sqrt(3)), b(n) = ((2 - i*sqrt(3))^n*((sqrt(3) - i)*m - 2*i*k) + (2 + i*sqrt(3))^n*(2*i*k + (sqrt(3) + i)*m))/(2*sqrt(3)), where i is the imaginary unit.
Convolution of A169585 and A168175.

Crossrefs

Programs

  • Maple
    a:=series((1+3*x)/(1-4*x+7*x^2),x=0,30): seq(coeff(a,x,n),n=0..29); # Paolo P. Lava, Mar 27 2019
  • Mathematica
    LinearRecurrence[{4, -7}, {1, 7}, 30]
  • PARI
    Vec((1+3*x)/(1-4*x+7*x^2) + O(x^99)) \\ Altug Alkan, Jul 13 2016

Formula

O.g.f.: (1 + 3*x)/(1 - 4*x + 7*x^2).
E.g.f.: (5*sqrt(3)*sin(sqrt(3)*x) + 3*cos(sqrt(3)*x))*exp(2*x)/3.
a(n) = 4*a(n-1) - 7*a(n-2).
a(n) = ((2 + i*sqrt(3))^n*(-5*i + sqrt(3)) + (2 - i*sqrt(3))^n*(5*i + sqrt(3)))/(2*sqrt(3)), where i is the imaginary unit.
a(n) = 7^(n/2)*((5/sqrt(3))*sin(c)+cos(c)) with c = n*arctan(sqrt(3)/2). - Peter Luschny, Jul 21 2016
Showing 1-7 of 7 results.