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.

Original entry on oeis.org

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

Views

Author

Robert Israel, Sep 02 2025

Keywords

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.

Examples

			a(3) = 13 is a term because 13 divides both 18^2 + 1 = 325 = 13 * 25 and 2^18 + 1 = 262145 = 13 * 20165.
		

Crossrefs

Subset of A004613. Cf. A001220, A066787.

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)]);