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 A346512 #27 Aug 06 2025 15:55:14 %S A346512 2,3,5,7,0,2,6,8,1,11,2,4,5,7,3,6,12,7,1,6,4,14,11,1,14,0,2,6,8,3,4,3, %T A346512 5,11,12,5,3,4,0,5,15,8,9,11,15,1,2,3,7,9,2,8,7,6,0,7,13,4,2,11,9,8,4, %U A346512 3,1,5,1,7,0,14,5,15,2,7,13,8,2,13,5,13,12 %N A346512 a(n) = bitwise XOR of decimal digits of primes. %H A346512 Mia Boudreau, <a href="/A346512/b346512.txt">Table of n, a(n) for n = 1..10000</a> %H A346512 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise operation">Bitwise operation</a> %F A346512 a(n) = A346511(A000040(n)). - _Mia Boudreau_, Aug 06 2025 %e A346512 a(10) = 2 XOR 9 = 11 as prime(10) = 29. %p A346512 b:= l-> `if`(l=[], 0, Bits[Xor](l[1], b(subsop(1=[][], l)))): %p A346512 a:= n-> b(convert(ithprime(n), base, 10)): %p A346512 seq(a(n), n=1..82); # _Alois P. Heinz_, Jul 21 2021 %t A346512 Table[BitXor @@ IntegerDigits[Prime[n]], {n, 1, 100}] (* _Amiram Eldar_, Jul 21 2021 *) %o A346512 (Sage) %o A346512 def XOR(a, b): %o A346512 return a ^^ b %o A346512 [reduce(XOR, map(lambda x: int(x), str(p))) for p in (0..100) if p in Primes()] %o A346512 (PARI) a(n) = my(d=digits(prime(n)), k=0); for (i=1, #d, k= bitxor(k, d[i])); k; \\ _Michel Marcus_, Jul 21 2021 %Y A346512 Cf. A000040, A346408, A346511 (XOR of digits of n), A003987 (Table of n XOR m read by antidiagonals). %K A346512 base,nonn,less %O A346512 1,1 %A A346512 _Jeremias M. Gomes_, Jul 21 2021