OFFSET
1,2
COMMENTS
Numbers that divide some term of A066787.
Every divisor of a term is a term.
The first term that is a square > 1 is 1093^2, with 49351666^2 + 1 and 2^49351666 + 1 both divisible by 1093^2.
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.
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
EXAMPLE
a(3) = 13 is a term because 13 divides both 18^2 + 1 = 325 = 13 * 25 and 2^18 + 1 = 262145 = 13 * 20165.
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)]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 02 2025
STATUS
approved
