OFFSET
1,2
COMMENTS
For n > 1, a(n) is the least divisor d of n that is larger than 1 and for which it holds that when the binary expansion of d is converted to a (0,1)-polynomial (e.g., 13=1101[2] encodes X^3 + X^2 + 1), then that polynomial is a divisor of (0,1)-polynomial similarly converted from n, when the division is done over GF(2). See the example.
LINKS
FORMULA
EXAMPLE
For n = 21 = 3*7, 3 is not the answer because X^1 + 1 does not divide X^4 + X^2 + 1 (21 is "10101" in binary) over GF(2). However, the next larger divisor 7 works because X^4 + X^2 + 1 = (X^2 + X^1 + 1)^2 when multiplication is done over GF(2) (note that A048720(7,7) = 21). Thus a(21) = 7.
PROG
(PARI) A325643(n) = if(1==n, n, my(p = Pol(binary(n))*Mod(1, 2)); fordiv(n, d, if((d>1), my(q = Pol(binary(d))*Mod(1, 2)); if(0==(p%q), return(d)))));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 11 2019
STATUS
approved