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.
%I A328178 #16 Nov 04 2019 14:52:34 %S A328178 0,3,2,0,4,1,6,6,0,7,10,4,12,5,6,0,16,5,18,1,4,9,22,2,0,15,10,3,28,3, %T A328178 30,12,8,19,2,0,36,17,14,13,40,1,42,15,12,21,46,8,0,15,18,9,52,15,14, %U A328178 10,16,31,58,9,60,29,14,0,8,13,66,21,20,11,70,1,72 %N A328178 a(n) is the minimal value of the expression d XOR (n/d) where d runs through the divisors of n and XOR denotes the bitwise XOR operator. %H A328178 Rémy Sigrist, <a href="/A328178/b328178.txt">Table of n, a(n) for n = 1..16384</a> %H A328178 Rémy Sigrist, <a href="/A328178/a328178.png">Logarithmic scatterplot of (n, 1+a(n)) for n = 1..2^16</a> %F A328178 a(n) = 0 iff n is a square. %F A328178 a(p) = p-1 for any odd prime number p. %e A328178 For n = 12: %e A328178 - we have the following values: %e A328178 d 12/d d XOR (12/d) %e A328178 -- ---- ------------ %e A328178 1 12 13 %e A328178 2 6 4 %e A328178 3 4 7 %e A328178 4 3 7 %e A328178 6 2 4 %e A328178 12 1 13 %e A328178 - hence a(12) = min({4, 7, 13}) = 4. %p A328178 a:= n-> min(seq(Bits[Xor](d, n/d), d=numtheory[divisors](n))): %p A328178 seq(a(n), n=1..100); # _Alois P. Heinz_, Oct 09 2019 %t A328178 mvx[n_]:=Min[BitXor[#,n/#]&/@Divisors[n]]; Array[mvx,80] (* _Harvey P. Dale_, Nov 04 2019 *) %o A328178 (PARI) a(n) = vecmin(apply(d -> bitxor(d, n/d), divisors(n))) %Y A328178 See A328176 and A328177 for similar sequences. %Y A328178 Cf. A178910. %K A328178 nonn,base %O A328178 1,2 %A A328178 _Rémy Sigrist_, Oct 06 2019