A141453 Primes p such that either p = 2^k + 1 or p = 2^k - 1, k>=0.
2, 3, 5, 7, 17, 31, 127, 257, 8191, 65537, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1
Keywords
Examples
From _Wolfdieter Lang_, Mar 28 2012: (Start) Solutions to the congruence x^2 == 1 (mod a(n)*2^(k(n)+1): n=3: r(5) = sqrt(5*2^(2+2) + 1) = 9. 9^2 = 81 == 1 (mod 5*8). The companion solution is 40-9 = 31. Because floor(81/40)=2 is even, 81 == 1 (Modd 40) also. 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. 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. (End)
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..22
Programs
-
Mathematica
Select[Prime[Range[30000]], Length[FactorInteger[#-1]]==1 || Length[FactorInteger[#+1]]==1&] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *) Select[Union[Join @@ Array[2^# + {-1, +1} &, 140, 0]], PrimeQ] (* Michael De Vlieger, Oct 23 2017 *)
Extensions
More terms from R. J. Mathar, Jan 23 2009
a(17) from Ray Chandler, Jun 22 2009
Comments