%I #12 Mar 12 2019 03:59:45
%S 0,3,2,6,4,5,6,12,10,15,10,10,12,9,10,24,16,27,18,30,18,29,22,20,28,
%T 23,18,18,28,17,30,48,42,51,36,54,36,53,42,60,40,63,42,58,34,57,46,40,
%U 54,43,34,46,52,45,60,36,42,39,58,34,60,33,42,96,76,99,66,102,82,101,70
%N n XOR (greatest proper divisor of n).
%C a(n) = n XOR A032742(n);
%C a(A000040(n)) = A000040(n) - 1 for n>1;
%C a(2*n) = A048724(n);
%C a(A022340(n)) = A022340(n) + A032742(A022340(n)).
%H Alois P. Heinz, <a href="/A106409/b106409.txt">Table of n, a(n) for n = 1..16383</a>
%p a:= n-> Bits[Xor](n, max(1, (numtheory[divisors](n) minus {n})[])):
%p seq(a(n), n=1..100); # _Alois P. Heinz_, May 15 2016
%t a[1] = 0; a[n_] := BitXor[n, Divisors[n][[-2]]]; Array[a, 100] (* _Jean-François Alcover_, Mar 12 2019 *)
%o (PARI) gpd(n) = if(n==1, 1, n/factor(n)[1, 1]); \\ A032742
%o a(n) = bitxor(n, gpd(n)); \\ _Michel Marcus_, Mar 12 2019
%K nonn,look
%O 1,2
%A _Reinhard Zumkeller_, May 02 2005