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

A107920 Lucas and Lehmer numbers with parameters (1 +- sqrt(-7))/2.

Original entry on oeis.org

0, 1, 1, -1, -3, -1, 5, 7, -3, -17, -11, 23, 45, -1, -91, -89, 93, 271, 85, -457, -627, 287, 1541, 967, -2115, -4049, 181, 8279, 7917, -8641, -24475, -7193, 41757, 56143, -27371, -139657, -84915, 194399, 364229, -24569, -753027, -703889, 802165, 2209943, 605613, -3814273
Offset: 0

Views

Author

Michael Somos, May 28 2005

Keywords

Comments

The sequences A001607, A077020, A107920, A167433, A169998 are all essentially the same except for signs.
This is an example of a sequence of Lehmer numbers. In this case, the two parameters, alpha and beta, are (1 +- i*sqrt(7))/2. Bilu, Hanrot, Voutier and Mignotte show that all terms of a Lehmer sequence a(n) have a primitive factor for n > 30. Note that for this sequence, a(30) = 24475 = 5*5*11*89 has no primitive factors. - T. D. Noe, Oct 29 2003
Row sums of Riordan array (1/(1+2*x^2), x/(1+2*x^2)). - Paul Barry, Sep 10 2005
Pisano period lengths: 1, 1, 8, 2, 24, 8, 21, 2, 24, 24, 10, 8, 168, 21, 24, 4, 144, 24, 360, 24, ... - R. J. Mathar, Aug 10 2012
This is the Lucas Sequence U_n(P, Q) = U_n(1, 2). V_n(1, 2) = A002249(n). - Raphie Frank, Dec 25 2013
Note that (A002249(n)/2)^2 + 7*(a(n)/2)^2 = 2^n for all n in N. This is a specific case of the Lucas sequence identity (V_n/2)^2 - D*(U_n/2)^2 = Q^n where V_n = (a^n + b^n), U_n = (a^n - b^n)/(a - b), Q = (a*b) = 2 and D = (a - b)^2 = -7; a = (1 + sqrt(-7))/2 and b = (1 - sqrt(-7))/2. - Raphie Frank, Nov 26 2015
For the special case where |a(n)| = 1, true for n if and only if n is in {1, 2, 3, 5, 13} = {A215795(n) + 1} = {A060728(n) - 2}, then, additionally, by the Lucas sequence identity (U_2n = U_n*V_n), we have (a(2n)/2)^2 + 7*(a(n)/2)^2 = 2^n. - Raphie Frank, Nov 26 2015

Examples

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

Crossrefs

Programs

  • Magma
    [0] cat [n le 2 select 1 else Self(n-1)-2*Self(n-2): n in [1..45]]; // Vincenzo Librandi, Nov 27 2015
  • Maple
    a:= n-> (Matrix([[1,1],[ -2,0]])^n)[1,2]: seq(a(n), n=0..45); # Alois P. Heinz, Sep 03 2008
  • Mathematica
    LinearRecurrence[{1, -2}, {0, 1}, 50] (* Vincenzo Librandi, Nov 27 2015 *)
    a[ n_] := Im[ ((1 + Sqrt[-7]) / 2)^n // FullSimplify] 2 / Sqrt[7]; (* Michael Somos, Jan 19 2017 *)
    a[n_] := If[n < 2, n, Hypergeometric2F1[1 - n/2, (1 - n)/2, 1 - n, 8]];
    Table[a[n], {n, 0, 45}] (* Peter Luschny, Feb 23 2018 *)
  • PARI
    {a(n) = imag(quadgen(-7)^n)};
    
  • PARI
    my(x='x+O('x^100)); concat(0, Vec(x/(1-x+2*x^2))) \\ Altug Alkan, Dec 04 2015
    
  • Sage
    [lucas_number1(n,1,2) for n in range(0, 46)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x / (1 - x + 2*x^2).
a(n) = a(n-1) - 2*a(n-2).
a(n) = -(-1)^n*A001607(n).
From Paul Barry, Sep 10 2005: (Start)
a(n+1) = Sum_{k=0..n} C((n+k)/2, k)*(-2)^((n-k)/2)*(1+(-1)^(n-k))/2.
a(n+1) = Sum_{k=0..floor(n/2)} C(n-k, k)*(-2)^k. (End)
a(n+1) = Sum_{k=0..n} A109466(n,k)*2^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = ((1 - i*sqrt(7))^n - (1 + i*sqrt(7))^n)*i/(2^n*sqrt(7)), where i=sqrt(-1). - Bruno Berselli, Jul 01 2011
(a(2*(A060728(n)) - 4))^2 = (A002249(A060728(n) - 2))^2 = 2^(A060728(n)) - 7 = A227078(n), the Ramanujan-Nagell squares. - Raphie Frank, Dec 25 2013
a(n) = -a(-n) * 2^n for all n in Z. - Michael Somos, Jan 19 2017
G.f.: x / (1 - x / (1 + 2*x / (1 - 2*x))). - Michael Somos, Jan 19 2017
a(n) = S(n-1, 1/sqrt(2))*(sqrt(2))^(n-1), n >= 0, with the Chebyshev S polynomials (coefficients in A049310), and S(-1, x) = 0. - Wolfdieter Lang, Feb 22 2018
a(n) = hypergeom([1-n/2, (1-n)/2], [1-n], 8) for n >= 2. - Peter Luschny, Feb 23 2018

A001607 a(n) = -a(n-1) - 2*a(n-2).

Original entry on oeis.org

0, 1, -1, -1, 3, -1, -5, 7, 3, -17, 11, 23, -45, -1, 91, -89, -93, 271, -85, -457, 627, 287, -1541, 967, 2115, -4049, -181, 8279, -7917, -8641, 24475, -7193, -41757, 56143, 27371, -139657, 84915, 194399, -364229, -24569, 753027, -703889
Offset: 0

Views

Author

Keywords

Comments

The sequences A001607, A077020, A107920, A167433, A169998 are all essentially the same except for signs.
Apart from the sign, this is an example of a sequence of Lehmer numbers. In this case, the two parameters, alpha and beta, are (1 +- i*sqrt(7))/2. Bilu, Hanrot, Voutier and Mignotte show that all terms of a Lehmer sequence a(n) have a primitive factor for n > 30. Note that for this sequence, a(30) = 24475 = 5*5*11*89 has no primitive factors. - T. D. Noe, Oct 29 2003

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Apart from signs, same as A077020.
Cf. A172250.

Programs

  • Magma
    [n eq 1 select 0 else n eq 2 select 1 else -Self(n-1)-2*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Aug 22 2011
    
  • Mathematica
    LinearRecurrence[{-1,-2},{0,1},60] (* Harvey P. Dale, Aug 21 2011 *)
  • PARI
    a(n)=if(n<0,0,polcoeff(x/(1+x+2*x^2)+x*O(x^n),n))
    
  • PARI
    a(n)=if(n<0,0,2*imag(((-1+quadgen(-28))/2)^n))
    
  • SageMath
    A001607=BinaryRecurrenceSequence(-1,-2,0,1)
    [A001607(n) for n in range(51)] # G. C. Greubel, Mar 24 2024

Formula

G.f.: x/(1+x+2*x^2).
a(n) = Sum_{k=0..n-1} (-1)^(n-k-1)*binomial(n-k-1, k)*2^k = -2/sqrt(7)*(-sqrt(2))^n*(sin(n*arctan(sqrt(7)))). - Vladeta Jovovic, Feb 05 2003
x/(x^2+x+2) = Sum_{n>=0} a(n)*(x/2)^n. - Benoit Cloitre, Mar 12 2002
4*2^n = A002249(n)^2 + 7*A001607(n)^2. See A077020, A077021.
a(n+1) = Sum_{k=0..n} A172250(n,k)*(-1)^k. - Philippe Deléham, Feb 15 2012
G.f.: x - 2*x^2 + 2*x^2/(G(0)+1) where G(k) = 1 + x/(1 - x/(x - 1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 16 2012
a(n) = 2^((n-1)/2)*ChebyshevU(n-1, -1/(2*sqrt(2))). - G. C. Greubel, Mar 24 2024
a(n) = (i*(((-1 - i*sqrt(7))/2)^n - ((-1 + i*sqrt(7))/2)^n))/sqrt(7). - Alan Michael Gómez Calderón, Jul 09 2024; after T. D. Noe, Oct 29 2003

A077020 a(n) is the unique odd positive solution x of 2^n = 7x^2+y^2.

Original entry on oeis.org

1, 1, 1, 3, 1, 5, 7, 3, 17, 11, 23, 45, 1, 91, 89, 93, 271, 85, 457, 627, 287, 1541, 967, 2115, 4049, 181, 8279, 7917, 8641, 24475, 7193, 41757, 56143, 27371, 139657, 84915, 194399, 364229, 24569, 753027, 703889, 802165, 2209943, 605613
Offset: 3

Views

Author

Ed Pegg Jr, Oct 17 2002

Keywords

Comments

The sequences A001607, A077020, A107920, A167433, A169998 are all essentially the same except for signs.

Examples

			G.f. = x^3 + x^4 + x^5 + 3*x^6 + x^7 + 5*x^8 + 7*x^9 + 3*x^10 + 17*x^11 + ...
a(3)=1 since 2^3=8=7*1^2+1^2, a(6)=3 since 2^6=64=7*3^2+1^2.
		

References

  • A. Engel, Problem-Solving Strategies. p. 126.

Crossrefs

a(n)=abs(A001607(n-2)).
Cf. A077021.

Formula

a(n) = 2^(n-2) * a(4-n) for all n in Z. - Michael Somos, Jan 05 2017
0 = 8*a(n)^2 + 2*a(n+1)^2 - a(n+2)^2 - a(n+3)^2 for all n in Z. - Michael Somos, Jan 05 2017
2*a(n) + a(n+1) = a(n+2) or a(n+3). - Michael Somos, Jan 05 2017

A167433 Row sums of the Riordan array (1-4x+4x^2, x(1-2x)) (A167431).

Original entry on oeis.org

1, -3, -1, 5, 7, -3, -17, -11, 23, 45, -1, -91, -89, 93, 271, 85, -457, -627, 287, 1541, 967, -2115, -4049, 181, 8279, 7917, -8641, -24475, -7193, 41757, 56143, -27371, -139657, -84915, 194399, 364229, -24569, -753027, -703889, 802165, 2209943
Offset: 0

Views

Author

Paul Barry, Nov 03 2009

Keywords

Comments

The sequences A001607, A077020, A107920, A167433, A169998 are all essentially the same except for signs.
Variants are A107920 and A001607.

Programs

  • Mathematica
    a[n_] := Sin[n*ArcTan[Sqrt[7]]]; FullSimplify[Join[{1}, Table[- (2^(n/2 + 1)/Sqrt[7])*(2*a[n] + Sqrt[2]*a[n + 1]), {n, 1, 100}]]] (* or *) Join[{1}, LinearRecurrence[{1,-2},{-3,-1},100]] (* G. C. Greubel, Jun 13 2016 *)

Formula

G.f.: (1-4x+4x^2)/(1-x+2x^2).
From G. C. Greubel, Jun 13 2016: (Start)
a(n) = a(n-1) - 2*a(n-2).
a(n) = -(2^((n+2)/2)/sqrt(7))*( 2*sin(n*arctan(sqrt(7))) + sqrt(2)*sin((n+1)*arctan(sqrt(7))) ), n>=1, and a(0)=1. (End)
Showing 1-4 of 4 results.