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

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

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

4*2^n = A002249(n)^2 + 7*A001607(n)^2. See A077020, A077021.
Among presented initial elements of the sequence a(n), the maximal increasing or decreasing subsequences have length either 3 or 4. - Roman Witula, Aug 21 2012
This is the Lucas Sequence V_n(P, Q) = V_n(1, 2). U_n(1, 2) = A107920(n). - Raphie Frank, Dec 25 2013
The only numbers that occur more than once are 1=a(1)=a(4) and -5=a(3)=a(9). See Noam D. Elkies's posting in the Mathematics Stack Exchange link. - Robert Israel, Dec 21 2016

Examples

			We have a(2)-a(7) = a(5)-a(4) = a(6)+a(4) = a(11)-a(10) = a(12)+a(10)=10. Further the following relations: ((1+i*sqrt(7))/2)^4 + ((1-i*sqrt(7))/2)^4 = 1 and ((1+i*sqrt(7))/2)^8 + ((1-i*sqrt(7))/2)^8 = -31. - _Roman Witula_, Aug 21 2012
G.f. = 2 + x - 3*x^2 - 5*x^3 + x^4 + 11*x^5 + 9*x^6 - 13*x^7 - 31*x^8 + ...
From _Raphie Frank_, Dec 05 2015: (Start)
V_n(1, 2) = a(1*n) = ((a(1) + sqrt(-7))/2)^n + ((a(1) - sqrt(-7))/2)^n; a(1) = 1.
V_n(-3, 4) = a(2*n) = ((a(2) + sqrt(-7))/2)^n + ((a(2) - sqrt(-7))/2)^n; a(2) = -3.
V_n(-5, 8) = a(3*n) = ((a(3) + sqrt(-7))/2)^n + ((a(3) - sqrt(-7))/2)^n; a(3) = -5.
V_n(11, 32) = a(5*n) = ((a(5) + sqrt(-7))/2)^n + ((a(5) - sqrt(-7))/2)^n; a(5) = 11.
V_n(-181, 8192) = a(13*n) = ((a(13) + sqrt(-7))/2)^n + ((a(13) - sqrt(-7))/2)^n; a(13) = -181.
(End)
		

Crossrefs

Programs

  • Magma
    I:=[2,1]; [n le 2 select I[n] else Self(n-1)-2*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Nov 29 2015
    
  • Maple
    A002249 := proc(n) option remember; >if n = 1 then 1 elif n = 2 then -3 else A002249(n-1>)-2*A002249(n-2); fi; end;
  • Mathematica
    LinearRecurrence[{1,-2}, {2,1}, 50] (* Roman Witula, Aug 21 2012 *)
    a[ n_] := 2^(n/2) ChebyshevT[ n, 8^(-1/2)] 2; (* Michael Somos, Jun 02 2014 *)
    a[ n_] := 2^Min[0, n] SeriesCoefficient[ (2 - x) / (1 - x + 2 x^2), {x, 0, Abs @ n}]; (* Michael Somos, Jun 02 2014 *)
    Table[2 Re[((1 + I Sqrt[7])/2)^n], {n, 0, 40}] (* Jean-François Alcover, Jun 02 2017 *)
  • PARI
    {a(n) = if( n<0, 2^n * a(-n), polsym(2 - x + x^2, n)[n+1])}; /* Michael Somos, Jun 02 2014 */
    
  • PARI
    {a(n) = 2 * real( ((1 + quadgen(-28)) / 2)^n )}; /* Michael Somos, Jun 02 2014 */
    
  • PARI
    x='x+O('x^100); Vec((2-x)/(1-x+2*x^2)) \\ Altug Alkan, Dec 04 2015
    
  • Python
    from sympy import sqrt, re, I
    def a(n): return 2*re(((1 + I*sqrt(7))/2)**n)
    print([a(n) for n in range(40)]) # Indranil Ghosh, Jun 02 2017
  • Sage
    [lucas_number2(n,1,2) for n in range(0, 40)] # Zerinvary Lajos, Apr 30 2009
    

Formula

G.f.: (2-x)/(1-x+2x^2). - Michael Somos, Oct 18 2002
a(n) = trace(A^n) for the square matrix A=[1, -2; 1, 0]. - Paul Barry, Sep 05 2003
a(n) = 2^((n+2)/2)*cos(-n*acot(sqrt(7)/7)). - Paul Barry, Sep 06 2003
a(n) = (-1)^n*(2*A110512(n) - A001607(n)) = ((1 + i*sqrt(7))/2)^n + ((1 - i*sqrt(7))/2)^n. - Roman Witula, Aug 21 2012
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(7*k+1)/(x*(7*k+8) + 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 03 2013
(a(A060728(n) - 2))^2 = (A107920(2*(A060728(n)) - 4))^2 = 2^(A060728(n)) - 7 = A227078(n), the Ramanujan-Nagell squares. - Raphie Frank, Dec 25 2013
a(n) = [x^n] ( (1 + x + sqrt(1 + 2*x - 7*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = (A107920(n+1) + 2*A107920(n+2) - A107920(n+3))/2. - Raphie Frank, Nov 28 2015
V_n(P,Q) = a(k*n) = ((a(k) + sqrt(-7))/2)^n + ((a(k) - sqrt(-7))/2)^n for k is in {1, 2, 3, 5, 13} = (A060728(n) - 2), P is in {1, -3, -5, 11, -181} = a(k), and Q is in {2, 4, 8, 32, 8192} = 2^k = (2*A076046(n) + 2) = (A227078(n) - 7)/4. P^2 - 4*Q = -7. - Raphie Frank, Dec 05 2015
From Peter Bala, Nov 16 2022: (Start)
The Gauss congruences hold: a(n*p^k) == a(n*p^(k-1)) (mod p^k) for all positive integers n and k and all primes p.
A268924(n) == a(3^n) (mod 3^n). (End)

A215795 Numbers n such that 2^n-1 is a triangular number (A000217).

Original entry on oeis.org

0, 1, 2, 4, 12
Offset: 1

Views

Author

V. Raman, Aug 23 2012

Keywords

Comments

Aside from a(2), all terms are even. Probably complete; no more terms up to 10^6. - Charles R Greathouse IV, Sep 07 2012
This sequence maps to the Ramanujan-Nagell squares (8*(2^n - 1) + 1) and is therefore complete. - Raphie Frank, Sep 10 2012
Define equivalence classes on a specified real interval with respect to the symmetric transitive closure of R(x,y) = "x is an integer multiple of y". If any equivalence class is finite (the conditions for which are given in A328129), then a smallest equivalence class has cardinality 1, 2, 4 or 12. - Peter Munn, Jun 02 2021

Crossrefs

Cf. A076046 (triangular numbers of the form 2^n - 1).
Cf. A060728 (a(n) + 3).
Cf. A038198 (sqrt(8*(2^n - 1)+1)).
Cf. A215797 ((sqrt(8*(2^n - 1)+1) - 1)/2).
Cf. A328129.

Programs

  • Mathematica
    Select[Range[0,15],OddQ[Sqrt[8(2^#-1)+1]]&] (* Harvey P. Dale, Dec 13 2024 *)
  • PARI
    is(n)=issquare(8<Charles R Greathouse IV, Sep 07 2012

Extensions

Four cross-references to the Ramanujan-Nagell problem added by Raphie Frank, Sep 10 2012

A227078 The Ramanujan-Nagell squares: A038198(n)^2.

Original entry on oeis.org

1, 9, 25, 121, 32761
Offset: 0

Views

Author

Raphie Frank, Jun 30 2013

Keywords

Comments

a(n) = (2*x - 1)^2 = (sqrt(2)*sqrt(sqrt(6*y^2 - 5) + 1) - 1)^2 = 2^(z + 3) - 7 for x, y, z are the solutions to two Diophantine equations noted by R. K. Guy: 2*x^2*(x^2 - 1) = 3*(y^2 - 1) & x*(x - 1)/2 = 2^z - 1 (see A180445). x = {1, 2, 3, 6, 91} = A180445(n), y = {1, 3, 7, 29, 6761} = A227077(n), and z = {0, 1, 2, 4, 12} = A215795(n).

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.

Crossrefs

Formula

a(n) + 7 = 2^A060728(n).
(a(n) - 1)/8 = A076046(n).

A180445 All positive solutions, x, for each of two Diophantine equations noted by Richard K. Guy.

Original entry on oeis.org

1, 2, 3, 6, 91
Offset: 1

Views

Author

Jonathan Vos Post, Sep 05 2010

Keywords

Comments

2*(x^2)*((x^2)-1) = 3*((y^2)-1) has only these five positive solutions.
x*(x-1)/2 = (2^z)-1 has only these five positive solutions.
Richard K. Guy notes, as Example 29: "True, but why the coincidence?"
Algebraically, y solutions = {1, 3, 7, 29, 6761} can be derived from x solutions as follows: y = sqrt(((2*x^2 - 1)^2 + 5)/6). From this relationship it becomes clear that the form (((2*x^2 - 1)^2 + 5)/6) can only be an integer square for x is in {1, 2, 3, 6, 91}. Thus, x and y solutions are also unique integer solutions to the following equivalency: (2x^2 - 1)^2 = 6y^2 - 5. From this relationship the following statement naturally follows: ((sqrt(6*y^2 - 5) + 1)/2 - sqrt((sqrt(6*(y^2) - 5) + 1)/2))/2 = (2^z - 1) = {0, 1, 3, 15, 4095} = A076046(n), the Ramanujan-Nagell triangular numbers; z = {0, 1, 2, 4, 12} = (A060728(n) - 3). - Raphie Frank, Jun 26 2013

Crossrefs

Formula

x = sqrt((sqrt(6*(y^2) - 5) + 1)/2) = (sqrt(2^(z + 3) - 7) + 1)/2; y = {1, 3, 7, 29, 6761} and z = (A060728(n) - 3) = A215795(n) = {0, 1, 2, 4, 12}. - Raphie Frank, Jun 23 2013

A247024 Primes of the form x*(2^x - x) - 1.

Original entry on oeis.org

3, 47, 347, 10139, 396527668833598369303619003, 1624796301562061610805093487, 2637188343637273091841153207596203623407
Offset: 1

Views

Author

R. J. Cano, Sep 09 2014

Keywords

Comments

Subsequence of A245014. a(n) represents the identity between (p + 4k^2 + 1) and (2n*4^k) for the least prime p defining A245014(k). Those first k where it occurs are: 1,2,3,5,41,42,62,183,357,407.
Consider the table of Stirling numbers of the second kind (A008277). The second column contains the numbers A000225, or 2^m - 1, and the first subdiagonal contains the triangular numbers. If a number appears in both sequences, we have the equation f(x) = 2^x - x^2 + x - 2 = 0 which has integer roots x = 1, 2, 3. Set g(x) = (x - 1)*(2^x - 1). Then it is found that the sum f(x) + g(x) for some even x defines this sequence and satisfies in common with A245014: Both sequences have three consecutive terms (those first) such that when they are represented in decimal the third term is the concatenation of the two terms preceding it.
Prime or PRP for x = 2, 4, 6, 10, 82, 84, 124, 366, 714, 814, 1584, 8938, 17812, 27054, 35380, 71358. - Jens Kruse Andersen, Sep 10 2014
The complete solution to the remark on Stirling2 numbers in a comment above is given in A076046. See also my Oct 08 2014 remark in the history. - Wolfdieter Lang, Oct 16 2014

Crossrefs

Programs

  • Magma
    [a: x in [0..450] | IsPrime(a) where a is x*(2^x - x)-1]; // Vincenzo Librandi, Oct 16 2014
  • Maple
    A247024:=n->`if`(isprime(n*(2^n-n)-1),n*(2^n-n)-1,NULL): seq(A247024(n), n=1..10^2); # Wesley Ivan Hurt, Sep 13 2014
  • Mathematica
    Select[Table[n(2^n - n) - 1, {n, 200}], PrimeQ] (* Alonso del Arte, Sep 09 2014 *)
  • PARI
    listToVec(l:list,Comp,Omega=#l)=vector(Omega,i,l[i][Comp]);
    fplusg(x)=x*(2^x-x)-1;
    find_next_N_terms(N,resumeFrom:list=List(),verbose=0)= {
      my(s:list,q,j,F,N0);
      s=resumeFrom;
      q=#s;
      N0=q;
      if(q,j=s[q][1]);
      while(q
    				
  • PFGW
    ABC2 $a*(2^$a-$a)-1
    a: from 2 to 100000 step 2
    Charles R Greathouse IV, Sep 18 2014
    

Extensions

Edited: 'penultimate column' replaced by 'first subdiagonal'. - Wolfdieter Lang, Oct 16 2014

A211202 Positive numbers n such that Lambda_n = A002336(n) is divisible by n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 12, 15, 16, 18, 20, 21, 22, 23, 24
Offset: 1

Views

Author

Raphie Frank, Feb 18 2013

Keywords

Comments

Observations:
For all n in this sequence to n = 24, then y = Lambda_n/n follows form: y = (x^2 + x^k) - (floor[z^2/4]) or y = (x^2 + x^k) + (floor[z^2/4]); k = 1 or 2 and z = 0, 1, 3, 6 or 7. y (= A222786) gives the average number of spheres/dimension of the laminated lattice Kissing numbers in A222785.
e.g. Where T_x is the x-th triangular number = (1/2*(x^2 + x)), 2*T_x is the x-th pronic number = (x^2 + x) = floor[(2*x + 1)^2/4], and S_x is the x-th square = (x^2) = floor[(2*x)^2/4]:
For k = 1, z = 0 or 1, then n = {1, 4, 6, 8, 15, 20, 24}, x = {1, 2, 3, 5, 12, 29, 90}, and y = 2*T_x = {2, 6, 12, 30, 156, 870, 8190}.
For k = 2, z = 0 or 1, then n = {1, 5, 7, 23}, x = {1, 2, 3, 45}, and y = 2*T_x + 2*T_(-x) = 2*S_x = {2, 8, 18, 4050}.
For k = 1, z = 3, then n = {3, 7, 12, 16}, x = {2, 4, 7, 16}, and y = 2*T_x - 2*T_1 = {4, 18, 54, 270}.
For k = 1, z = 6, then n = {2, 18}, x = {3, 20}, and y = 2*T_x - S_3 = {3, 411}.
For k = 1, z = 7, then n = {5, 7, 8, 21}, x = {4, 5, 6, 36}, and y = 2*T_x - 2*T_3 = {8, 18, 30, 1320}.
For k = 1, z = 7, then n = {6, 7, 12, 22}, x = {0, 2, 6, 47}, and y = 2*T_x + 2*T_3 = {12, 18, 54, 2268}.
For the special case where k = 1 and z = 0 or 1, then all associated x values follow form (A216162(n) - A216162(n - 2)) [type 1] or (A216162(n) - A216162(n - 1)) [type II] for some n in N. Type II x values = {1, 2, 5, 90} (= A215797(n+1)) are associated with the positive Ramanujan-Nagell triangular numbers = {1, 3, 15, 4095} (= A076046(n+1)) by the formula 1/2*(x^2 + x) = T_x.

Examples

			Lambda_6/6 = 72/6 = 12, so 6 is in this sequence.
Lambda_12/12 = 648/12 = 54, so 12 is in this sequence.
Lambda_18/18 = 7398/18 = 411, so 18 is in this sequence.
Lambda_24/24 = 196560/24 = 8190, so 24 is in this sequence.
But...
Lambda_19/19 = 10668/19 = 561.47368..., so 19 is not in this sequence.
		

Crossrefs

A218129 2^(((c - 2)^2 + (c - 2))/2) + n = a(n), where c are the positive solutions to {y in N | 2*cos(2*Pi/y) is in Z}; c = {1,2,3,4,6}.

Original entry on oeis.org

1, 2, 4, 11, 1028
Offset: 0

Views

Author

Raphie Frank, Oct 21 2012

Keywords

Comments

The set {c} consists of the complete set of positive solutions to the short proof of the Crystallographic Restriction Theorem {1, 2, 3, 4, 6} (see A217290).
Let {V} = prime(a(n)) = {2, 3, 7, 31, 8191}. Then all elements of {V} follow form x^2 + x + 1 for some x in R; x = {(sqrt(5) - 1)/2, 1, 2, 5, 90}. (V + V(mod 2) - 2)/2 gives the complete set of Ramanujan-Nagell triangular numbers (A076046) = {0, 1, 3, 15, 4095} == (2^F_(c + 1) - 2)/2 (see A215929); F_n the n-th Fibonacci number (A000045).
Additionally, 2*V - 1 = {3, 5, 13, 61, 16381} is prime and, therefore, all elements of {V} are links in a Cunningham chain of the 2nd kind (see A005382).

Examples

			2^(((1 - 2)^2 + (1 - 2))/2) + 0 = 2^(a(-1) - 1) + 0 = 1 = a(0).
2^(((2 - 2)^2 + (2 - 2))/2) + 1 = 2^(a(0) - 1) + 1 = 2 = a(1).
2^(((3 - 2)^2 + (3 - 2))/2) + 2 = 2^(a(1) - 1) + 2 = 4 = a(2).
2^(((4 - 2)^2 + (4 - 2))/2) + 3 = 2^(a(2) - 1) + 3 = 11 = a(3).
2^(((6 - 2)^2 + (6 - 2))/2) + 4 = 2^(a(3) - 1) + 4 = 1028 = a(4).
		

Crossrefs

Formula

to n = 4, then a(n) = 2^(a(n - 1) - 1) + n; a(-1) = 1.
Showing 1-8 of 8 results.