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!)
A193232 Bitwise XOR of first n triangular numbers. 3
0, 1, 2, 4, 14, 1, 20, 8, 44, 1, 54, 116, 58, 97, 8, 112, 248, 97, 202, 116, 166, 65, 188, 424, 132, 449, 158, 484, 114, 449, 16, 480, 1008, 449, 914, 484, 894, 449, 804, 40, 796, 65, 966, 116, 938, 1953, 920, 2032, 872, 1953, 858, 1652, 790, 1665, 844, 1352 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MAPLE
a:= proc(n) option remember; `if`(n=0, 0,
Bits[Xor](a(n-1), n*(n+1)/2))
end:
seq(a(n), n=0..55); # Alois P. Heinz, Feb 19 2023
MATHEMATICA
Module[{nn=60, trs}, trs=Accumulate[Range[nn]]; Table[BitXor@@Take[trs, n], {n, 0, nn}]] (* Harvey P. Dale, Dec 15 2017 *)
PROG
(PARI) al(n) = local(m); vector(n, k, m=bitxor(m, k*(k+1)\2))
(Python)
from operator import xor
from functools import reduce
def A193232(n): return reduce(xor, (x*(x+1) for x in range(n+1)))//2 # Chai Wah Wu, Dec 16 2021
CROSSREFS
Sequence in context: A369998 A369606 A325117 * A336841 A189486 A131758
KEYWORD
nonn
AUTHOR
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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)