login
A387642
a(n) is the least number x such that x^2 + 1 and 2^x + 1 are both divisible by A387595(n).
1
0, 2, 18, 4, 70, 450, 50, 182, 1170, 18, 216, 4050, 1602, 98, 374, 742, 4514, 286, 1118, 12870, 882, 6288, 16562, 1710, 900, 2040, 182, 14070, 3818, 5005, 2482, 16614, 14062, 13398, 748, 30690, 5754, 30846, 1254, 32100, 16626, 76230, 612, 20272, 2394, 83950, 450, 23622, 54470, 5790, 117990, 1602
OFFSET
1,2
COMMENTS
a(n) is the least number x such that x^2 + 1 and 2^x + 1 are both divisible by the n-th number k for which there exists x such that x^2 + 1 and 2^x + 1 are both divisible by k.
LINKS
FORMULA
a(n)^2 == 2^a(n) == -1 (mod A387595(n)).
EXAMPLE
a(3) = 18 because A387595(3) = 13, 18^2 == 2^18 == -1 (mod 13), and no smaller number works.
MAPLE
f:= proc(n) local a, b, x, y, t, tt;
uses NumberTheory;
if n::even then return -1 fi;
a:=[msolve(x^2 + 1 = 0, n)];
if a = [] then return -1 fi;
a:= map(t -> rhs(op(t)), a);
b:=msolve(2^x + 1 = 0, t, n);
if b = {} or b = NULL then return -1 fi;
b:= rhs(op(b));
tt:= indets(b)[1];
subs(infinity=-1, min(map(proc(s) local r; r:= ChineseRemainder([s, subs(tt=0, b)], [n, coeff(b, tt)]); if r = FAIL then +infinity else r fi end proc, a)));
end proc:
f(1):= 0:
subs(-1=NULL, map(f, [$1..1000]));
CROSSREFS
Sequence in context: A383240 A253603 A094048 * A179073 A087665 A093481
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 04 2025
STATUS
approved