A387595 Numbers k that divide both x^2 + 1 and 2^x + 1 for some number x.
1, 5, 13, 17, 29, 37, 41, 53, 61, 65, 97, 101, 109, 113, 137, 145, 149, 157, 173, 181, 185, 193, 197, 229, 241, 257, 265, 269, 277, 281, 293, 313, 317, 349, 353, 373, 377, 389, 397, 401, 409, 421, 433, 449, 457, 461, 481, 509, 521, 533, 541, 545, 557, 565, 569, 577, 593, 613, 617, 641, 653, 661
Offset: 1
Examples
a(3) = 13 is a term because 13 divides both 18^2 + 1 = 325 = 13 * 25 and 2^18 + 1 = 262145 = 13 * 20165.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Mathematics StackExchange, Primes where x^2+1 == 2^x+1 == 0 (mod p^2) has a solution
Programs
-
Maple
# Note: due to a bug in Maple, this program fails for 1093^2 (at least up to Maple 2025) filter:= proc(n) local a,b,b0,b1,x,t,tt; uses NumberTheory; if n::even then return false fi; a:=[msolve(x^2 + 1 = 0, n)]; if a = [] then return false fi; a:= map(t -> rhs(op(t)), a); b:=msolve(2^x + 1 = 0,t, n); if b = {} or b = NULL then return false fi; b:= rhs(op(b)); tt:= indets(b)[1]; b0:= subs(tt=0,b); b1:= coeff(b,tt); for x in a do if ChineseRemainder([x,b0],[n,b1]) <> FAIL then return true fi od; false end proc: filter(1):= true: select(filter, [seq(seq(i+6*j,i=[1,5]),j=0..1000)]);
Comments