cp's OEIS Frontend

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.

A106409 n XOR (greatest proper divisor of n).

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