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 13 results. Next

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

A100051 A Chebyshev transform of 1,1,1,...

Original entry on oeis.org

1, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1
Offset: 0

Views

Author

Paul Barry, Oct 31 2004

Keywords

Comments

1, followed by period 6: repeat [1, -1, -2, -1, 1, 2]. - Joerg Arndt, Aug 28 2024
A Chebyshev transform of 1/(1-x): if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
Transform of 1/(1+x) under the mapping g(x)->((1+x)/(1-x))g(x/(1-x)^2). - Paul Barry, Dec 01 2004
Multiplicative with a(p^e) = -1 if p = 2; -2 if p = 3; 1 otherwise. - David W. Wilson, Jun 10 2005

Examples

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^2)/(1 - x + x^2), {x,0,50}], x] (* G. C. Greubel, May 03 2017 *)
    LinearRecurrence[{1,-1},{1,1,-1},80] (* Harvey P. Dale, Mar 25 2019 *)
  • PARI
    {a(n) = - (n == 0) + [2, 1, -1, -2, -1, 1][n%6 + 1]}; /* Michael Somos, Mar 21 2011 */

Formula

From Paul Barry, Dec 01 2004: (Start)
G.f.: (1-x^2)/(1-x+x^2).
a(n) = a(n-1) - a(n-2), n>2.
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)/(n-k).
a(n) = Sum_{k=0..n} binomial(n+k, 2k)*(2n/(n+k))*(-1)^k, n>1. (End)
Moebius transform is length 6 sequence [1, -2, -3, 0, 0, 6].
Euler transform of length 6 sequence [1, -2, -1, 0, 0, 1].
a(n) = a(-n). a(n) = c_6(n) if n>1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
a(n) = A087204(n), n>0. - R. J. Mathar, Sep 02 2008
a(n) = A057079(n+1), n>0. Dirichlet g.f. zeta(s) *(1-2^(1-s)-3^(1-s)+6^(1-s)). - R. J. Mathar, Apr 11 2011

A131027 Period 6: repeat [4, 3, 1, 0, 1, 3].

Original entry on oeis.org

4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Third column of triangular array T defined in A131022.
a(n) = abs(A078070(n+1)).
Determinants of the spiral knots S(3,k,(1,1)). a(k+4) = det(S(3,k,(1,1))). These knots are also the torus knots T(3,k). - Ryan Stees, Dec 13 2014

Examples

			For k=3, b(7)=sqrt(3)b(6)-b(5)=3-1=2, so det(S(3,3,(1,1)))=2^2=4.
		

Crossrefs

Cf. A087204, A131022, A078070. Other columns of T are in A088911, A131026, A131028, A131029, A131030.

Programs

  • Magma
    m:=105; [ [4, 3, 1, 0, 1, 3][(n-1) mod 6 + 1]: n in [1..m] ];
    
  • Maple
    A131027:=n->2+cos(n*Pi/3)+sqrt(3)*sin(n*Pi/3): seq(A131027(n), n=1..100); # Wesley Ivan Hurt, Sep 11 2014
  • Mathematica
    Table[2 + Cos[n*Pi/3] + Sqrt[3]*Sin[n*Pi/3], {n, 30}] (* Wesley Ivan Hurt, Sep 11 2014 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%6; print1(if(r==0, 4, if(r==1||r==5, 3, if(r==3, 0, 1))), ","))}
    
  • Sage
    [(lucas_number2(n,2,1)-lucas_number2(n-1,1,1)) for n in range(4, 109)] # Zerinvary Lajos, Nov 10 2009

Formula

a(1) = 4, a(2) = a(6) = 3, a(3) = a(5) = 1, a(4) = 0, a(6) = 1; for n > 6, a(n) = a(n-6).
G.f.: (4-5*x+3*x^2)/((1-x)*(1-x+x^2)).
a(n) = 2+cos(n*Pi/3)+sqrt(3)*sin(n*Pi/3) = 2+(-1)^((n-1)/3)+(-1)^((1-n)/3). - Wesley Ivan Hurt, Sep 11 2014
a(k+4) = det(S(3,k,(1,1))) = (b(k+4))^2, where b(5)=1, b(6)=sqrt(3), b(k)=sqrt(3)*b(k-1) - b(k-2) = b(6)*b(k-1) - b(k-2). - Ryan Stees, Dec 13 2014
a(n) = 2 + 2*cos(Pi/3*(n-1)) = 2 + A087204(n-1) for n >= 1. - Werner Schulte, Jul 18 2017 and Peter Munn, Apr 28 2022

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

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 21, 42, 84, 169, 340, 682, 1365, 2730, 5460, 10921, 21844, 43690, 87381, 174762, 349524, 699049, 1398100, 2796202, 5592405, 11184810, 22369620, 44739241, 89478484, 178956970, 357913941, 715827882, 1431655764, 2863311529, 5726623060
Offset: 0

Views

Author

Creighton Dement, Aug 21 2005

Keywords

Comments

Binomial transform of sequence (0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0). Note: the binomial transform of the sequence (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A111926; the binomial transform of the sequence (0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A024495 (disregarding first two terms, which are both zero).
The sequence relates the calculation of the logarithm of the Twin Prime Constants of order 3 to the sequence of prime zeta functions, see definition 7 in arXiv:0903.2514. - R. J. Mathar, Mar 28 2009

Crossrefs

Programs

  • Maple
    seq(sum(binomial(n, k*3), k=1..n), n=0..33); # Zerinvary Lajos, Oct 23 2007
  • Mathematica
    LinearRecurrence[{4,-6,5,-2},{0,0,0,1},40] (* Harvey P. Dale, Jul 04 2017 *)
  • PARI
    concat(vector(3), Vec(x^3/((x-1)*(2*x-1)*(x^2-x+1)) + O(x^40))) \\ Colin Barker, Feb 10 2017

Formula

a(n+2) - a(n+1) + a(n) = A000225(n).
a(n) - a(n-1) = A024495(n-1).
From Colin Barker, Feb 10 2017: (Start)
a(n) = 2^n/3 + 2*cos((Pi*n)/3)/3 - 1. [Cournot]
a(n) = 4*a(n-1) - 6*a(n-2) + 5*a(n-3) - 2*a(n-4) for n > 3. (End)
a(n) = (2^n+A087204(n))/3 - 1. - R. J. Mathar, Aug 07 2017
a(n) = (1/3)*Sum_{k=0..n-1} binomial(n, 3*floor(k/3)+3). - Taras Goy, Jan 26 2025
E.g.f.: (exp(x)*(exp(x) - 3) + 2*exp(x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Feb 06 2025

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

Original entry on oeis.org

0, 1, 3, 3, 5, 10, 14, 23, 39, 61, 99, 162, 260, 421, 683, 1103, 1785, 2890, 4674, 7563, 12239, 19801, 32039, 51842, 83880, 135721, 219603, 355323, 574925, 930250, 1505174, 2435423, 3940599, 6376021, 10316619, 16692642, 27009260, 43701901
Offset: 0

Views

Author

Creighton Dement, Nov 21 2004

Keywords

Comments

This sequence was investigated in cooperation with Paul Barry.
Generating floretion: - 0.5'i - 0.5'k - 0.5j' - 0.5'ii' + 0.5'jj' - 0.5'kk' + 0.5'ik' - 0.5'ki' ("tes").
From Joshua P. Bowman, Sep 28 2023: (Start)
a(n) is equal to the number of circular binary sequences of length n+1 with an even number of 0's and no consecutive 1's. A circular binary sequence is a finite sequence of 0's and 1's for which the first and last digits are considered to be adjacent. Rotations are distinguished from each other.
a(n) is also equal to the number of matchings in the cycle graph C_{n+1} for which the number of edges plus the number of unmatched vertices is even.
a(n) is also equal to the number of circular compositions of n+1 into an even number of 1's and 2's. (End)

Examples

			When counting circular binary sequences with an even number of 0's and no consecutive 1's, the sequence "1" is not allowed because the 1 is considered to be adjacent to itself. Thus a(0)=0. For n=2, the a(2)=3 allowed sequences of length 3 are 001, 010, and 100. For n=3, the a(3)=3 allowed sequences of length 4 are 0000, 0101, and 1010. - _Joshua P. Bowman_, Sep 28 2023
		

Crossrefs

Programs

  • Magma
    I:=[0,1,3,3]; [n le 4 select I[n] else Self(n-2)+2*Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 30 2015
  • Mathematica
    a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 3; a[n_] := a[n] = a[n - 2] + 2a[n - 3] + a[n - 4]; Table[ a[n], {n, 0, 36}]
    (* Or *) CoefficientList[ Series[x(1 + 3x + 2x^2)/((1 + x + x^2)(1 - x - x^2)), {x, 0, 36}], x] (* Robert G. Wilson v, Nov 26 2004 *)
    LinearRecurrence[{0,1,2,1},{0,1,3,3},40] (* Harvey P. Dale, Apr 04 2016 *)
  • Maxima
    a(n):=n*sum(binomial(k,n-k)*(if oddp(k) then 0 else 1/k),k,1,n); /* Vladimir Kruchinin, Apr 09 2011 */
    
  • PARI
    a(n)=n*sum(j=1,n\2,k=2*j;binomial(k,n-k)/k);
    vector(66,n,a(n)) /* Joerg Arndt, Apr 09 2011 */
    
  • PARI
    concat([0],Vec(x*(1+3*x+2*x^2)/((1+x+x^2)*(1-x-x^2))+O(x^66))) /* Joerg Arndt, Apr 09 2011 */
    

Formula

(1/2)*(a(n) + A100887(n) - A100888(n)) = A061347(n+3).
a(n) = (L(n+1)-A061347(n+1))/2, L=A000032; [corrected by Wojciech Florek, Feb 26 2018]
a(n) = a(n-2) + 2*a(n-3) + a(n-4), a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 3.
a(n) = n*Sum_{j=1..floor(n/2)} binomial(2*j,n-2*j)/(2*j). - Vladimir Kruchinin, Apr 09 2011 (with offset 1, cf. PARI code)
a(n) = floor(phi^(n+1)/2), n mod 3 = 0,1; a(n) = floor((phi^(n+1)+3)/2), n mod 3 = 2, phi = (1 + sqrt(5))/2; from Binet's formula or the relation to the Lucas numbers A000032. - Wojciech Florek, Mar 03 2018
a(n) = A000032(n+1) - A366043(n+1). - Joshua P. Bowman, Sep 28 2023

Extensions

More terms from Robert G. Wilson v, Nov 26 2004

A130781 Sequence is identical to its third differences: a(n+3) = 3*a(n+2) - 3*a(n+1) + 2*a(n), with a(0)=a(1)=1, a(2)=2.

Original entry on oeis.org

1, 1, 2, 5, 11, 22, 43, 85, 170, 341, 683, 1366, 2731, 5461, 10922, 21845, 43691, 87382, 174763, 349525, 699050, 1398101, 2796203, 5592406, 11184811, 22369621, 44739242, 89478485, 178956971, 357913942, 715827883, 1431655765, 2863311530
Offset: 0

Views

Author

Paul Curtz, Jul 14 2007, Jul 18 2007

Keywords

Comments

The inverse binomial transform is 1,0,1,... repeated with period 3, essentially A011655. - R. J. Mathar, Aug 28 2023

Crossrefs

Essentially a duplicate of A024493.

Programs

  • Mathematica
    a[n_] := a[n] = 3 a[n - 1] - 3 a[n - 2] + 2 a[n - 3]; a[0] = a[1] = 1; a[2] = 2; Table[a@n, {n, 0, 33}] (* Or *)
    CoefficientList[ Series[(1 - 2 x + 2 x^2)/(1 - 3 x + 3 x^2 - 2 x^3), {x, 0, 33}], x] (* Robert G. Wilson v, Sep 08 2007 *)
    LinearRecurrence[{3,-3,2},{1,1,2},40] (* Harvey P. Dale, Sep 17 2013 *)

Formula

3*a(n) = 2^(n+1) + A087204(n+1).
Also first differences of A024494.
G.f.: (1-2x+2x^2)/(1-3x+3x^2-2x^3).
Binomial transform of [1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, ...]; i.e., ones in positions 2, 5, 8, 11, ... and the rest zeros. [Corrected by Gary W. Adamson, Jan 07 2008]

Extensions

Edited by N. J. A. Sloane, Jul 28 2007

A087205 a(n) = -2*a(n-1) + 4*a(n-2), a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 0, 8, -16, 64, -192, 640, -2048, 6656, -21504, 69632, -225280, 729088, -2359296, 7634944, -24707072, 79953920, -258736128, 837287936, -2709520384, 8768192512, -28374466560, 91821703168, -297141272576, 961569357824, -3111703805952
Offset: 0

Views

Author

Paul Barry, Aug 25 2003

Keywords

Comments

Inverse binomial transform of A087204.

Crossrefs

Programs

  • Magma
    [(-1)^(n+1)*2^n*Fibonacci(n-2): n in [0..50]]; // G. C. Greubel, Oct 08 2018
  • Mathematica
    Table[-(-2)^n*Fibonacci[n - 2], {n, 0, 50}] (* G. C. Greubel, Oct 08 2018 *)
    LinearRecurrence[{-2,4},{1,2},30] (* Harvey P. Dale, Jan 24 2022 *)
  • PARI
    Vec((4*x+1)/(-4*x^2+2*x+1)+O(x^66)) \\ Joerg Arndt, Jul 14 2013
    
  • PARI
    vector(50, n, n--; (-1)^(n+1)*2^n*fibonacci(n-2)) \\ G. C. Greubel, Oct 08 2018
    

Formula

a(n) = (-1-sqrt(5))^n * (1/2-3*sqrt(5)/10) + (-1+sqrt(5))^n * (1/2+3*sqrt(5)/10).
G.f.: (4*x +1)/(-4*x^2 +2*x +1). - Joerg Arndt, Jul 14 2013
a(n+2) = A085449(n)*(-1)^(n+1); a(n+3) = A063727(n)*(-1)^n.
a(n) = -(-2)^n*F(n-2) for n >= 0, with F = A000045, and F(-1) = 1, F(-2) = -1. - Wolfdieter Lang, Oct 08 2018

A353446 Let g be the inverse Möbius transform of the Eisenstein integer-valued function f defined in A353445. a(n) is twice the real part of g(n).

Original entry on oeis.org

2, 1, 1, 0, 1, 2, 1, 2, 0, -1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 2, 2, 0, 1, 1, 1, 0, 2, -1, 2, 0, 1, 2, -1, 1, 1, 1, 1, 0, 0, -1, 1, 2, 0, 0, 2, 0, 1, 1, -1, 1, -1, 2, 1, 0, 1, -1, 0, 2, 2, 1, 1, 0, 2, 1, 1, 0, 1, 2, 0, 0, 2, 1, 1, -1, 1, -1, 1, 0, -1, 2, -1, 1, 1, 0, -1, 0, 2, -1, 2, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Apr 19 2022

Keywords

Comments

The imaginary part of g(n) is A353354(n)*(sqrt(3)/2)*i.
f(n), g(n), and so also a(n), are determined by the cubefree part of n, A050985(n). If the cubefree part is not squarefree, g(n) is 0; otherwise g(n) = x^(A195017(A050985(n))), where x = (1 + sqrt(3)*i)/2, the primitive 6th root of unity with positive imaginary part.
The above formula arises from g being multiplicative (because f is multiplicative). g(prime(m)^k) is 1 for k == 0 (mod 3), 0 for k == 2 (mod 3), and for k == 1 (mod 3) the result depends on the parity of m. g(prime(m)^(3k+1)) is 1+w for odd m, -w for even m, where w is the cube root of unity with positive imaginary part. 1+w and -w are the primitive 6th roots of unity.
So the range of g is the 6 sixth roots of unity and 0 itself: these are the 7 Eisenstein integers closest to 0, and they are clearly closed under multiplication. The range of (a(n)) is [-2..2]. g(n) and a(n) are 0 if and only if the cubefree part of n is not squarefree. (Compare with the Moebius function being 0 when its argument is not squarefree.) Otherwise a(n) is even if and only if n is in A332820.

Crossrefs

Sequences used in a definition of this sequence: A008966, A050985, A090882, A087204, A195017, A353445.
See A353354 for the imaginary part.
Positions of particular values depend on A059269, A211337, A211338, A332820 as shown in the formula section.
Positions of even numbers: A353355.

Programs

  • PARI
    A050985(n) = { my(f=factor(n)); f[, 2] = apply(x->(x % 3), f[, 2]); factorback(f); }; \\ From A050985
    A087204(n) = ([2, 1, -1, -2, -1, 1][1+(n%6)]);
    A195017(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * (-1)^(1+primepi(f[i,1])))); };
    A353446(n) = { my(u=A050985(n)); issquarefree(u) * A087204(abs(A195017(u))); };

Formula

a(n) = A008966(m) * A087204(A090882(m)) = A008966(m) * A087204(|A195017(m)|), where m = A050985(n), the cubefree part of n, and A008966(.) is the characteristic function of squarefree numbers.
For n >= 1, -2 <= a(n) <= 2.
{n : a(n) = -2} = {A211338} INTERSECT {A332820}.
{n : a(n) = -1} = {A211337} \ {A332820}.
{n : a(n) = 0} = {A059269}.
{n : a(n) = 1} = {A211338} \ {A332820}.
{n : a(n) = 2} = {A211337} INTERSECT {A332820}.

A272931 a(n) = 2^(n+1)*cos(n*arctan(sqrt(15))).

Original entry on oeis.org

2, 1, -7, -11, 17, 61, -7, -251, -223, 781, 1673, -1451, -8143, -2339, 30233, 39589, -81343, -239699, 85673, 1044469, 701777, -3476099, -6283207, 7621189, 32754017, 2269261, -128746807, -137823851, 377163377, 928458781, -580194727, -4294029851, -1973250943
Offset: 0

Views

Author

Peter Luschny, May 11 2016

Keywords

Comments

For n >= 1, |a(n)| is the unique odd positive solution y to 4^(n+1) = 15*x^2 + y^2. The value of x is |A106853(n-1)|. - Jianing Song, Jan 22 2019

Crossrefs

Programs

  • Maple
    seq(simplify(((1-I*sqrt(15))^n + (1+I*sqrt(15))^n)/2^n), n=0..32);
  • Mathematica
    LinearRecurrence[{1, -4}, {2, 1}, 33]
  • PARI
    Vec((2 - x) / (1 - x + 4*x^2) + O(x^40)) \\ Colin Barker, Jan 22 2019
  • Sage
    [lucas_number2(i, 1, 4) for i in range(33)]
    

Formula

Let a(x) = x/2 - i*sqrt(15)*x/2 and b(x) = x/2 + i*sqrt(15)*x/2, then:
a(n) = a(1)^n + b(1)^n.
a(n) = n! [x^n] exp(a(x)) + exp(b(x)).
a(n) = [x^n] (2 - x)/(4*x^2 - x + 1).
a(n) = Sum_{k=0..floor(n/2)} (-4)^k*n*(n - k - 1)!/(k!*(n - 2*k)!) for n >= 1.
For n >= 1, 15*a(n)^2 + A106853(n-1)^2 = 4^(n+1). - Jianing Song, Jan 22 2019
a(n) = a(n-1) - 4*a(n-2) for n>1. - Colin Barker, Jan 22 2019
a(n) = 2*A106853(n) - A106853(n-1). - R. J. Mathar, Aug 19 2022

A122876 a(0)=1, a(1)=1, a(2)=2, a(n) = a(n-1) - a(n-2) for n>2.

Original entry on oeis.org

1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1
Offset: 0

Views

Author

Philippe Deléham, Oct 24 2006

Keywords

Comments

Essentially the same as A057079, A087204 and A100051.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,-1}, {1,1,2}, 50] (* G. C. Greubel, May 03 2017; corrected by Georg Fischer, Apr 02 2019 *)
    (* or *) CoefficientList[Series[(1 + 2*x^2)/(1 - x + x^2), {x,0,50}], x] (* G. C. Greubel, May 03 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x^2)/(1-x+x^2)) \\ G. C. Greubel, May 03 2017

Formula

a(n) = Sum_{k=0..floor(n/2)} (-2)^k*A055830(n-k,k).
G.f.: (1+2*x^2)/(1-x+x^2).
Showing 1-10 of 13 results. Next