OFFSET
1,2
COMMENTS
Take the n-th GF(2) polynomial, compute its sum of divisors, and find the index of that polynomial in the list of GF(2) polynomials.
If 2^k <= n < 2^(k+1), then also 2^k <= a(n) < 2^(k+1), since any proper divisor of a GF(2) polynomial has lower degree.
Numbers whose binary representations correspond to the divisors occur as the nonzero terms on row n of A280499, and they are XORed together to obtain a(n). A280493 gives another GF(2)[X]-analog of A000203. - Antti Karttunen, Jan 11 2017
LINKS
FORMULA
EXAMPLE
5 => x^2 + 1 = (x+1)^2. sigma((x+1)^2) = (x+1)^2 + x+1 + 1 = x^2 + x + 1 => 7, so a(5) = 7. (All polynomials here are over GF(2).)
PROG
(PARI) a(n)={local(p, fm, r, k);
while(n>0, p+=Mod(n, 2)*x^k; n\=2; k++);
r=Mod(1, 2); fm=factor(p); for(k=1, matsize(fm)[1], r*=(fm[k, 1]^(fm[k, 2]+1)-1)/(fm[k, 1]-1));
subst(lift(r), x, 2)}
(PARI) a(n) = {my(s = vecsum(divisors(Mod(1, 2)*Pol(binary(n))))); subst(lift(s), x, 2); } \\ Michel Marcus, Jan 13 2019
(Scheme)
;; A003987bi implements the 2-argument bitwise-XOR function (A003987).
;; A091255bi implements the 2-argument GF(2)[X] GCD-function (A091255) which is used for checking that k is a divisor of n.
(define (A178908 n) (let loop ((k n) (s 0)) (if (zero? k) s (loop (- k 1) (A003987bi s (if (= k (A091255bi n k)) k 0))))))
;; Antti Karttunen, Jan 11 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jun 22 2010
STATUS
approved