The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A346511 a(n) = bitwise XOR of decimal digits of n. 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 6, 7, 4, 5, 2, 3, 0, 1, 14, 15, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 8, 9, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(12) = 1 XOR 2 = 01_2 XOR 10_2 = 11_2 = 3.
MAPLE
b:= l-> `if`(l=[], 0, Bits[Xor](l[1], b(subsop(1=[][], l)))):
a:= n-> b(convert(n, base, 10)):
seq(a(n), n=0..82); # Alois P. Heinz, Jul 21 2021
MATHEMATICA
Table[BitXor @@ IntegerDigits[n], {n, 0, 100}] (* Amiram Eldar, Jul 21 2021 *)
PROG
(Sage)
def XOR(a, b):
return a ^^ b
[reduce(XOR, map(lambda x: int(x), str(n))) for n in (0..1000)]
(PARI) a(n) = my(d=digits(n), k=0); for (i=1, #d, k= bitxor(k, d[i])); k; \\ Michel Marcus, Jul 21 2021
CROSSREFS
Sequence in context: A247149 A330350 A222210 * A177894 A287877 A175398
KEYWORD
base,nonn
AUTHOR
Jeremias M. Gomes, Jul 21 2021
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 June 7 14:33 EDT 2024. Contains 373199 sequences. (Running on oeis4.)