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

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

A060728 Numbers n such that Ramanujan's equation x^2 + 7 = 2^n has an integer solution.

Original entry on oeis.org

3, 4, 5, 7, 15
Offset: 1

Views

Author

Lekraj Beedassy, Apr 25 2001

Keywords

Comments

See A038198 for corresponding x. - Lekraj Beedassy, Sep 07 2004
Also numbers such that 2^(n-3)-1 is in A000217, i.e., a triangular number. - M. F. Hasler, Feb 23 2009
With respect to M. F. Hasler's comment above, all terms 2^(n-3) - 1 are known as the Ramanujan-Nagell triangular numbers (A076046). - Raphie Frank, Mar 31 2013
Interestingly enough, all the solutions correspond to noncomposite x, i.e., x = 1 for the first term, and primes 3, 5, 11, 181 for the following terms. - M. F. Hasler, Mar 11 2024

Examples

			The fifth and ultimate solution to Ramanujan's equation is obtained for the 15th power of 2, so that we have x^2 + 7 = 2^15 yielding x = 181.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 181, p. 56, Ellipses, Paris 2008.
  • J. Roberts, Lure of the Integers. pp. 90-91, MAA 1992.
  • Ian Stewart & David Tall, Algebraic Number Theory and Fermat's Last Theorem, 3rd Ed. Natick, Massachusetts (2002): 96-98.

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | IsSquare(2^n-7)]; // Vincenzo Librandi, Jan 07 2014
    
  • Mathematica
    ramaNagell[n_] := Reduce[x^2 + 7 == 2^n, x, Integers] =!= False; Select[ Range[100], ramaNagell] (* Jean-François Alcover, Sep 21 2011 *)
  • PARI
    is(n)=issquare(2^n-7) \\ Anders Hellström, Dec 12 2015

Formula

a(n) = log_2(8*A076046(n) + 8) = log_2(A227078(n) + 7)
Empirically, a(n) = Fibonacci(c + 1) + 2 = ceiling[e^((c - 1)/2)] + 2 where {c} is the complete set of positive solutions to {n in N | 2 cos(2*Pi/n) is in Z}; c is in {1,2,3,4,6} (see A217290).

Extensions

Added keyword "full", M. F. Hasler, Feb 23 2009

A038198 Numbers n such that n^2 + 7 is a power of 2.

Original entry on oeis.org

1, 3, 5, 11, 181
Offset: 1

Views

Author

Keywords

Comments

The exponents of the corresponding powers of 2 are 3, 4, 5, 7, 15 (see Ramanujan). - N. J. A. Sloane, Jun 01 2014
The terms lead to identities resembling Machin's Pi/4 = arctan(1/1) = 4*arctan(1/5) - arctan(1/239), for example, arctan(sqrt(7)/1) = 5*arctan(sqrt(7)/11) + 2*arctan(sqrt(7)/181), which can also be expressed as arcsin(sqrt(7/2^3)) = 5*arcsin(sqrt(7/2^7)) + 2*arcsin(sqrt(7/2^15)) (cf. A168229). - Joerg Arndt, Nov 09 2012

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 181, p. 56, Ellipses, Paris 2008.
  • L. J. Mordell, Diophantine Equations, Academic Press, NY, 1969, p. 205.
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. See Question 464, p. 327. - N. J. A. Sloane, Jun 01 2014

Crossrefs

Programs

  • Mathematica
    ok[n_] := Reduce[k>0 && n^2 + 7 == 2^k, k, Integers] =!= False; Select[Range[1000], ok] (* Jean-François Alcover, Sep 21 2011 *)
  • PARI
    [x | n<-[0..99], issquare(2^n-7,&x)] \\ M. F. Hasler, Mar 11 2024

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

Original entry on oeis.org

1, 3, 5, 1, 11, 9, 13, 31, 5, 57, 67, 47, 181, 87, 275, 449, 101, 999, 797, 1201, 2795, 393, 5197, 5983, 4411, 16377, 7555, 25199, 40309, 10089, 90707, 70529, 110885, 251943, 30173, 473713, 534059, 413367, 1481485, 654751, 2308219, 3617721
Offset: 3

Views

Author

Ed Pegg Jr, Oct 17 2002

Keywords

Comments

Restate the formula and divide both sides by 4, then y^2 - (-7)*x^2 = 2^n and (y/2)^2 - (-7)*(x/2)^2 = 2^(n-2). Let y = V_n, x = U_n, -7 = D, and 2^(n-2) = Q^n. We then have this sequence as the absolute values for V_n = A002249(n)(excluding a(0) = 2) in relation to the Lucas sequence identity: (V_n/2)^2 - D*(U_n/2)^2 = Q^n with V_n = (a^n + b^n), U_n = (a^n - b^n)/(a - b), D = (a - b)^2 = P^2 - 4*Q = -7, Q = (a*b) = 2; a = (1 + sqrt(-7))/2, b = (1 - sqrt(-7))/2, P = 1. By the Ramanujan-Nagell Theorem, iff y is in +- {1, 3, 5, 11, 181} = +-A038198, then |x| = 1 and we are left with 2^n = 7 + y^2. See A060728 and note that a(A060728(n) - 3) = A038198(n). - Raphie Frank, Dec 05 2015

References

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

Crossrefs

Cf. A077020 (x).

Programs

  • Mathematica
    a = {}; Do[k = Expand[((1 + I Sqrt[7])/2)^n + ((1 - I Sqrt[7])/2)^n]; AppendTo[a, Abs[k]], {n, 1, 50}]; a (* Artur Jasinski, Oct 05 2008 *)

Formula

a(n+2) = abs(A002249(n)). - Artur Jasinski, Oct 05 2008 [With correction by Jianing Song, Nov 21 2018]

A105578 a(n+3) = 2a(n+2) - 3a(n+1) + 2a(n); a(0) = 1, a(1) = 1, a(2) = 0.

Original entry on oeis.org

1, 1, 0, -1, 0, 3, 4, -1, -8, -5, 12, 23, 0, -45, -44, 47, 136, 43, -228, -313, 144, 771, 484, -1057, -2024, 91, 4140, 3959, -4320, -12237, -3596, 20879, 28072, -13685, -69828, -42457, 97200, 182115, -12284, -376513, -351944, 401083, 1104972, 302807, -1907136, -2512749, 1301524, 6327023, 3723976
Offset: 0

Views

Author

Creighton Dement, Apr 14 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: ibaseiseq[.5'j + .5'k + .5j' + .5k' + .5'ii' + .5e]

Crossrefs

Equals (A107920(n) + 1)/2.

Programs

Formula

a(n) - a(n+1) = A001607(n); a(n+2) - 2a(n+1) + a(n) = - A078020(n).
G.f.: -(x^2-x+1) / ((x-1)*(2*x^2-x+1)). - Colin Barker, Feb 08 2015

A105577 a(n) = 2*a(n-1) - 3*a(n-2) + 2*a(n-3) with a(0) = 1, a(1) = 5, a(2) = 6.

Original entry on oeis.org

1, 5, 6, -1, -10, -5, 18, 31, -2, -61, -54, 71, 182, 43, -318, -401, 238, 1043, 570, -1513, -2650, 379, 5682, 4927, -6434, -16285, -3414, 29159, 35990, -22325, -94302, -49649, 138958, 238259, -39654, -516169, -436858, 595483, 1469202, 278239, -2660162, -3216637, 2103690, 8536967
Offset: 0

Views

Author

Creighton Dement, Apr 14 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: 2lesseq[.5'j + .5'k + .5j' + .5k' + .5'ii' + .5e]

Crossrefs

Equals (1/4) [A107920(n+4) + 2*A107920(n-1) + 3].

Programs

  • Mathematica
    LinearRecurrence[{2,-3,2},{1,5,6},50] (* Harvey P. Dale, Apr 13 2019 *)

Formula

G.f.: (1+3*x-x^2)/((1-x)*(1-x+2*x^2)). - Colin Barker, Mar 26 2012
E.g.f.: exp(x/2)*(21*exp(x/2) - 7*cos(sqrt(7)*x/2) + 15*sqrt(7)*sin(sqrt(7)*x/2))/14. - Stefano Spezia, May 22 2025

A105579 a(n+3) = 2a(n+2) - 3a(n+1) + 2a(n); a(0) = 1, a(1) = 3, a(2) = 4.

Original entry on oeis.org

1, 3, 4, 1, -4, -3, 8, 17, 4, -27, -32, 25, 92, 45, -136, -223, 52, 501, 400, -599, -1396, -195, 2600, 2993, -2204, -8187, -3776, 12601, 20156, -5043, -45352, -35263, 55444, 125973, 15088, -236855, -267028, 206685, 740744, 327377, -1154108, -1808859, 499360, 4117081, 3118364, -5115795, -11352520
Offset: 0

Views

Author

Creighton Dement, Apr 14 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: famseq[.5'j + .5'k + .5j' + .5k' + .5'ii' + .5e]

Crossrefs

Cf. Equals (1/2) [A107920(n+4) - 2*A107920(n-1) + 3 ].

Programs

  • Mathematica
    Table[(3 - ((1-I*Sqrt[7])^n + (1+I*Sqrt[7])^n)/2^n)/2 // Simplify, {n, 1, 50}] (* Jean-François Alcover, Jun 04 2017 *)

Formula

a(n+1) - a(n) = A002249(n).
a(n) = 2*a(n-1)-3*a(n-2)+2*a(n-3). G.f.: (1+x+x^2)/((1-x)*(1-x+2*x^2)). [Colin Barker, Mar 27 2012]

Extensions

Corrected by T. D. Noe, Nov 07 2006

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

A002248 Number of points on y^2 + xy = x^3 + x^2 + x over GF(2^n).

Original entry on oeis.org

2, 8, 14, 16, 22, 56, 142, 288, 518, 968, 1982, 4144, 8374, 16472, 32494, 65088, 131174, 263144, 525086, 1047376, 2094358, 4193912, 8393806, 16783200, 33550022, 67092488, 134210174, 268460656, 536911222
Offset: 1

Views

Author

Keywords

Comments

This is a divisibility sequence; that is, if n divides m, then a(n) divides a(m). The point at infinity is counted also. - T. D. Noe, Mar 12 2009

Programs

  • Magma
    I:=[2, 8, 14, 16]; [n le 4 select I[n] else 4*Self(n-1)-7*Self(n-2)+8*Self(n-3)-4*Self(n-4): n in [1..45]]; // Vincenzo Librandi, Jun 18 2012
    
  • Mathematica
    Needs["FiniteFields`"]; Table[cnt=1; (* 1 point at infinity *) f=Table[GF[2,n][IntegerDigits[i,2,n]], {i,0,2^n-1}]; Do[If[y^2+x*y-x^3-x^2-x==0, cnt++ ], {x,f}, {y,f}]; cnt, {n,6}] (* T. D. Noe, Mar 12 2009 *)
    LinearRecurrence[{4,-7,8,-4},{2,8,14,16},30] (* Vincenzo Librandi, Jun 18 2012 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -4,8,-7,4]^(n-1)*[2;8;14;16])[1,1] \\ Charles R Greathouse IV, Jun 23 2020

Formula

a(n) = 2^n + 1 - b(n); b(n) = b(n-1) - 2*b(n-2), b(1)=1, b(2)=-3; b(n) = A002249(n).
G.f.: -2*x*(-1+2*x^2) / ( (x-1)*(2*x-1)*(2*x^2 - x + 1) ).
a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 4*a(n-4). - Vincenzo Librandi, Jun 18 2012
Showing 1-10 of 14 results. Next