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.

A237054 a(1)=1, a(n) = (a(n-1) + n) XOR n.

This page as a plain text file.
%I A237054 #14 Nov 26 2024 15:18:11
%S A237054 1,1,7,15,17,17,31,47,49,49,55,79,81,81,111,111,145,177,215,255,257,
%T A237054 257,271,319,321,321,327,383,385,385,447,511,513,513,519,527,529,529,
%U A237054 543,623,689,753,823,847,849,849,943,1007,1041,1137,1175,1279,1281,1281
%N A237054 a(1)=1, a(n) = (a(n-1) + n) XOR n.
%H A237054 Paolo Xausa, <a href="/A237054/b237054.txt">Table of n, a(n) for n = 1..10000</a>
%F A237054 a(1)=1, then a(n) = (a(n-1) + n) XOR n, where XOR is the bitwise exclusive-OR operator.
%t A237054 Module[{n = 1}, NestList[BitXor[++n, # + n] &, 1, 100]] (* _Paolo Xausa_, Nov 26 2024 *)
%o A237054 (Python)
%o A237054 a=1
%o A237054 for n in range(2, 77):
%o A237054   print(a, end=', ')
%o A237054   a = (a+n) ^ n
%Y A237054 Cf. A182389, A182242.
%K A237054 nonn,easy
%O A237054 1,3
%A A237054 _Alex Ratushnyak_, Feb 03 2014