The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A330271 a(n) is the least nonnegative integer k such that n XOR k is a cube (where XOR denotes the bitwise XOR operator). 3
 0, 0, 2, 2, 4, 4, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 11, 10, 9, 8, 15, 14, 13, 12, 3, 2, 1, 0, 7, 6, 5, 4, 32, 32, 34, 34, 36, 36, 38, 38, 32, 33, 34, 35, 36, 37, 38, 39, 43, 42, 41, 40, 47, 46, 45, 44, 35, 34, 33, 32, 39, 38, 37, 36, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Rémy Sigrist, Table of n, a(n) for n = 0..8192 FORMULA a(n) = 0 iff n is a cube. EXAMPLE For n = 4: - 4 XOR 0 = 4 (not a cube), - 4 XOR 1 = 5 (not a cube), - 4 XOR 2 = 6 (not a cube), - 4 XOR 3 = 7 (not a cube), - 4 XOR 4 = 0 = 0^3, - hence a(4) = 4. PROG (PARI) a(n) = for (k=0, oo, if (ispower(bitxor(n, k), 3), return (k))) CROSSREFS See A330270 for the square variant. See A330272 for the OR variant. Cf. A000578, A003987, A296615. Sequence in context: A341948 A347661 A007730 * A257686 A057144 A198332 Adjacent sequences:  A330268 A330269 A330270 * A330272 A330273 A330274 KEYWORD nonn,base AUTHOR Rémy Sigrist, Dec 08 2019 STATUS approved

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

Last modified September 28 19:16 EDT 2021. Contains 347717 sequences. (Running on oeis4.)