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.

A141453 Primes p such that either p = 2^k + 1 or p = 2^k - 1, k>=0.

This page as a plain text file.
%I A141453 #37 Oct 24 2017 02:31:11
%S A141453 2,3,5,7,17,31,127,257,8191,65537,131071,524287,2147483647,
%T A141453 2305843009213693951,618970019642690137449562111,
%U A141453 162259276829213363391578010288127,170141183460469231731687303715884105727
%N A141453 Primes p such that either p = 2^k + 1 or p = 2^k - 1, k>=0.
%C A141453 Sequence consists of 2 and the union of the Mersenne primes (A000668) and the Fermat primes (A019434).
%C A141453 a(18) has 157 digits and is too large to include. - _Ray Chandler_, Jun 22 2009
%C A141453 From _Wolfdieter Lang_, Mar 28 2012: (Start)
%C A141453 The sequence of exponents k of 2 for these Mersenne or Fermat primes is k=[0, 1, 2, 3, 4, 5, 7, 8, 13, 16, 17, 19, 31, 61, 89, 107, 127,...], n>=1, if 3 is considered as Fermat prime.
%C A141453   The second exponent is 2 if 3 is considered as Mersenne prime. The next exponent k(18)=521 for the Mersenne prime a(18).
%C A141453 r(a(n)) := sqrt(a(n)*2^(k(n)+2) + 1) is a solution of the congruence x^2 == 1 (mod a(n)*2^(k(n)+1)), n>=1. The sequence k is given in the preceding comment. If n=2 then, besides r(3) = 5, also sqrt(3*2^(2+2) + 1) = 7 is an incongruent solution mod 12 if the exponent 2 is chosen. For n=2 there are altogether four incongruent solutions of x^2 == 1 (mod 12), namely 1, 12-1 = 11, r(3)=5 and 12-5 = 7. If n=1 there are altogether two incongruent solutions, namely 1 and r(2) = 3 = 4-1 (a trivial solution == -1 (mod 4)). For n>=3 there are eight incongruent solutions, and besides the trivial (positive) ones, 1 and a(n)*2^(k(n)+1) - 1, one has a nontrivial pair r(a(n)) and a(n)*2^(k(n)+1) - r(a(n)). For the number of incongruent solutions of the congruence x^2 == 1 (mod n) see A060594. For the r(a(n)) values see A210844.
%C A141453 r(a(n)), n>=1, also solves the congruence x^2 == 1 (Modd a(n)*2^(k(n)+1)), because floor((r(a(n))^2)/(a(n)*2^(k(n)+1)) is even. For Modd n (not to be confused with mod n) see a comment on A203571.
%C A141453 (End)
%H A141453 Michael De Vlieger, <a href="/A141453/b141453.txt">Table of n, a(n) for n = 1..22</a>
%e A141453 From _Wolfdieter Lang_, Mar 28 2012: (Start)
%e A141453 Solutions to the congruence x^2 == 1 (mod a(n)*2^(k(n)+1):
%e A141453 n=3: r(5) = sqrt(5*2^(2+2) + 1) = 9. 9^2 = 81 == 1 (mod 5*8).
%e A141453   The companion solution is 40-9 = 31. Because floor(81/40)=2 is even, 81 == 1 (Modd 40) also.
%e A141453 n=4: r(7) =  sqrt(7*2^(3+2) + 1) = 15. 15^2 = 225 == 1 (mod 7*16). The companion solution is 112-15 = 97. Because floor(225/112)=2 is even, 225 == 1 (Modd 112) also.
%e A141453 n=7: r(127) = sqrt(127*2^(7+2) + 1) = 255. 255^2 == 1 (mod 127*2^8). The companion solution is 32512-255 = 32257.
%e A141453 (End)
%t A141453 Select[Prime[Range[30000]], Length[FactorInteger[#-1]]==1 || Length[FactorInteger[#+1]]==1&] (* _Vladimir Joseph Stephan Orlovsky_, Feb 03 2012 *)
%t A141453 Select[Union[Join @@ Array[2^# + {-1, +1} &, 140, 0]], PrimeQ] (* _Michael De Vlieger_, Oct 23 2017 *)
%Y A141453 Cf. A000668, A019434.
%K A141453 nonn
%O A141453 1,1
%A A141453 _Leroy Quet_, Aug 07 2008
%E A141453 More terms from _R. J. Mathar_, Jan 23 2009
%E A141453 a(17) from _Ray Chandler_, Jun 22 2009