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.

A387595 Numbers k that divide both x^2 + 1 and 2^x + 1 for some number x.

This page as a plain text file.
%I A387595 #20 Sep 07 2025 12:23:36
%S A387595 1,5,13,17,29,37,41,53,61,65,97,101,109,113,137,145,149,157,173,181,
%T A387595 185,193,197,229,241,257,265,269,277,281,293,313,317,349,353,373,377,
%U A387595 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
%N A387595 Numbers k that divide both x^2 + 1 and 2^x + 1 for some number x.
%C A387595 Numbers that divide some term of A066787.
%C A387595 Every divisor of a term is a term.
%C A387595 The first term that is a square > 1 is 1093^2, with 49351666^2 + 1 and 2^49351666 + 1 both divisible by 1093^2.
%C A387595 All prime divisors of a term that is a square must be Wieferich primes == 1 (mod 4). The only known Wieferich prime == 1 (mod 4) is 1093.
%H A387595 Robert Israel, <a href="/A387595/b387595.txt">Table of n, a(n) for n = 1..10000</a>
%H A387595 Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/5094063/primes-where-x21-equiv-2x1-equiv-0-pmod-p2-has-a-solution">Primes where x^2+1 == 2^x+1 == 0 (mod p^2) has a solution</a>
%e A387595 a(3) = 13 is a term because 13 divides both 18^2 + 1 = 325 = 13 * 25 and 2^18 + 1 = 262145 = 13 * 20165.
%p A387595 # Note: due to a bug in Maple, this program fails for 1093^2 (at least up to Maple 2025)
%p A387595 filter:= proc(n) local a,b,b0,b1,x,t,tt;
%p A387595     uses NumberTheory;
%p A387595     if n::even then return false fi;
%p A387595     a:=[msolve(x^2 + 1 = 0, n)];
%p A387595     if a = [] then return false fi;
%p A387595     a:= map(t -> rhs(op(t)), a);
%p A387595     b:=msolve(2^x + 1 = 0,t, n);
%p A387595     if b = {} or b = NULL then return false fi;
%p A387595     b:= rhs(op(b));
%p A387595     tt:= indets(b)[1];
%p A387595   b0:= subs(tt=0,b); b1:= coeff(b,tt);
%p A387595     for x in a do
%p A387595     if ChineseRemainder([x,b0],[n,b1]) <> FAIL then return true fi
%p A387595   od;
%p A387595     false
%p A387595 end proc:
%p A387595 filter(1):= true:
%p A387595 select(filter, [seq(seq(i+6*j,i=[1,5]),j=0..1000)]);
%Y A387595 Subset of A004613. Cf. A001220, A066787.
%K A387595 nonn,new
%O A387595 1,2
%A A387595 _Robert Israel_, Sep 02 2025