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 A384441 #70 Jun 09 2025 18:35:15 %S A384441 1,0,0,6,0,7,0,10,10,13,0,13,0,11,9,18,0,19,0,19,17,31,0,25,28,21,24, %T A384441 25,0,26,0,34,41,49,33,37,0,55,41,47,0,44,0,37,43,59,0,49,54,53,33,59, %U A384441 0,55,57,61,41,37,0,56,0,35,59,66,73,72,0,87,81,70,0,73,0,109 %N A384441 Binary XOR of n and the prime factors of n. %H A384441 Alois P. Heinz, <a href="/A384441/b384441.txt">Table of n, a(n) for n = 1..16384</a> %H A384441 Karl-Heinz Hofmann, <a href="/A384441/a384441_2.png">Graph up to n = 2^17</a> %H A384441 Karl-Heinz Hofmann, <a href="/A384441/a384441_3.gif">Zoom trip of the graph with number of prime factors of n colored.</a> %H A384441 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise_operation#XOR">Bitwise operation: XOR</a> %F A384441 a(n) = XOR(n,A293212(n)). %F A384441 a(n) = 0 <=> n is prime. %F A384441 a(2^n) = A052548(n) for n>=2. %e A384441 For n = 12 the prime factors are {2,3} -> a(12) = 12 XOR 2 XOR 3 = 13. %e A384441 a(13) = 13 XOR 13 = 0. %p A384441 f:= l-> `if`(l=[], 0, Bits[Xor](l[1], f(l[2..-1]))): %p A384441 a:= n-> f([n, map(i-> i[1], ifactors(n)[2])[]]): %p A384441 seq(a(n), n=1..74); # _Alois P. Heinz_, May 30 2025 %t A384441 a[n_] := BitXor @@ Join[{n}, FactorInteger[n][[;; , 1]]]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, May 30 2025 *) %o A384441 (Python) %o A384441 from sympy import primefactors %o A384441 def A384441(n): %o A384441 result = n %o A384441 for pf in primefactors(n): result ^= pf %o A384441 return result %o A384441 (PARI) a(n) = my(f=factor(n)[,1]); my(b=n); for (k=1, #f, b=bitxor(b, f[k])); b; \\ _Michel Marcus_, May 30 2025 %Y A384441 Cf. A000040, A052548, A178910, A293212. %K A384441 nonn,base,look,easy %O A384441 1,4 %A A384441 _Karl-Heinz Hofmann_, May 30 2025