login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106409 n XOR (greatest proper divisor of n). 9
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, 23, 18, 18, 28, 17, 30, 48, 42, 51, 36, 54, 36, 53, 42, 60, 40, 63, 42, 58, 34, 57, 46, 40, 54, 43, 34, 46, 52, 45, 60, 36, 42, 39, 58, 34, 60, 33, 42, 96, 76, 99, 66, 102, 82, 101, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = n XOR A032742(n);
a(A000040(n)) = A000040(n) - 1 for n>1;
a(2*n) = A048724(n);
a(A022340(n)) = A022340(n) + A032742(A022340(n)).
LINKS
MAPLE
a:= n-> Bits[Xor](n, max(1, (numtheory[divisors](n) minus {n})[])):
seq(a(n), n=1..100); # Alois P. Heinz, May 15 2016
MATHEMATICA
a[1] = 0; a[n_] := BitXor[n, Divisors[n][[-2]]]; Array[a, 100] (* Jean-François Alcover, Mar 12 2019 *)
PROG
(PARI) gpd(n) = if(n==1, 1, n/factor(n)[1, 1]); \\ A032742
a(n) = bitxor(n, gpd(n)); \\ Michel Marcus, Mar 12 2019
CROSSREFS
Sequence in context: A033940 A286367 A196047 * A115510 A230598 A245446
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, May 02 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)