A298398 a(n) is the smallest odd b > 1 such that (b^(2n) + 1)/2 has all prime divisors p == 1 (mod 2n).
3, 3, 5, 3, 9, 5, 15, 3, 199, 3, 45, 13, 25, 13, 181, 3, 35, 71, 39, 9, 545, 21, 45, 5, 101, 5, 1405, 13, 59, 107, 61, 3, 5369, 13, 7069, 305, 221, 39, 131, 3, 165, 169, 85, 43
Offset: 1
Examples
a(5) = 9 since (9^10 + 1)/2 = 41 * 42521761, 41 = 1 (mod 5*2) and 42521761 = 1 (mod 5*2), so all divisors d == 1 (mod 10).
Links
- Kevin P. Thompson, Factorizations to support known terms of a(n) for n = 1..57
Crossrefs
Cf. A298299.
Programs
-
Maple
g:= proc(t) convert(select(type,map(s -> s[1], ifactors(t,easy)[2]),integer),set); end proc: F:= proc(n) local s,t,b,C,B,k,bb,Cb, easyf; uses numtheory; t:= 2^padic:-ordp(n,2); s:= n/t; C:= unapply({seq(numtheory:-cyclotomic(m,-b^(2*t)),m=numtheory:-divisors(s) minus {1}), (b^(2*t)+1)/2},b); B:= select(t -> C(t) mod (2*n) = {1}, [seq(b,b=1..2*n-1,2)]); for k from 0 do for bb in B do b:= k*2*n+bb; if b < 2 then next fi; Cb:= remove(isprime,C(b)); if Cb = {} then return b fi; easyf:= map(g, Cb) mod (2*n); if not (`union`(op(easyf)) subset {1}) then next fi; if andmap(c -> factorset(c) mod (2*n) = {1}, Cb) then return b fi; od od end proc: map(F, [$1..26]); # Robert Israel, Jan 18 2018
-
Mathematica
Array[Block[{b = 3}, While[Union@ Mod[FactorInteger[(b^(2 #) + 1)/2][[All, 1]], 2 #] != {1}, b += 2]; b] &, 20] (* Michael De Vlieger, Jan 20 2018 *) f[n_] := Block[{b = 3}, Label[init]; While[ PowerMod[b, 2n, 2n] != 1, b += 2]; d = First@# & /@ FactorInteger[(b^(2n) +1)/2]; If[ Union@ Mod[d, 2n] != {1}, b += 2; Goto[init]]; b]; Array[f, 30] (* Robert G. Wilson v, Jan 22 2018 *)
-
PARI
isok(b, n) = {pf = factor((b^(2*n) + 1)/2)[, 1]; for (j=1, #pf, if (lift(Mod(pf[j], 2*n)) != 1, return (0));); return(1);} a(n) = {my(b = 3); while (!isok(b, n), b += 2); b;} \\ Michel Marcus, Jan 19 2018
Formula
a(n) = min{b > 1: b is odd and for all prime p, if p | (b^(2n) + 1)/2 then p == 1 (mod 2n)}. - Kevin P. Thompson, Mar 14 2022
Extensions
a(9)-a(30) from Robert Israel, Jan 18 2018
a(20) corrected by Michel Marcus, Jan 19 2018
a(31)-a(44) from Kevin P. Thompson, Mar 13 2022
Comments