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 A346511 #48 Aug 06 2025 15:55:49 %S A346511 0,1,2,3,4,5,6,7,8,9,1,0,3,2,5,4,7,6,9,8,2,3,0,1,6,7,4,5,10,11,3,2,1, %T A346511 0,7,6,5,4,11,10,4,5,6,7,0,1,2,3,12,13,5,4,7,6,1,0,3,2,13,12,6,7,4,5, %U A346511 2,3,0,1,14,15,7,6,5,4,3,2,1,0,15,14,8,9,10 %N A346511 a(n) = bitwise XOR of decimal digits of n. %H A346511 Mia Boudreau, <a href="/A346511/b346511.txt">Table of n, a(n) for n = 0..10000</a> %H A346511 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise operation">Bitwise operation</a> %e A346511 a(5) = 5. %e A346511 a(12) = 1 XOR 2 = 3. %e A346511 a(425) = 4 XOR 2 XOR 5 = 3. %p A346511 b:= l-> `if`(l=[], 0, Bits[Xor](l[1], b(subsop(1=[][], l)))): %p A346511 a:= n-> b(convert(n, base, 10)): %p A346511 seq(a(n), n=0..82); # _Alois P. Heinz_, Jul 21 2021 %t A346511 Table[BitXor @@ IntegerDigits[n], {n, 0, 100}] (* _Amiram Eldar_, Jul 21 2021 *) %o A346511 (Sage) %o A346511 def XOR(a, b): %o A346511 return a ^^ b %o A346511 [reduce(XOR, map(lambda x: int(x), str(n))) for n in (0..1000)] %o A346511 (PARI) a(n) = my(d=digits(n), k=0); for (i=1, #d, k= bitxor(k, d[i])); k; \\ _Michel Marcus_, Jul 21 2021 %o A346511 (C) %o A346511 char a(unsigned long long n){ %o A346511 char p = 0; %o A346511 while (n > 0) {p ^= n % 10; n /= 10;} %o A346511 return p;} %o A346511 // _Mia Boudreau_, Aug 05 2025 %K A346511 base,nonn,easy %O A346511 0,3 %A A346511 _Jeremias M. Gomes_, Jul 21 2021