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.

A182389 a(0)=1, a(n) = (a(n-1) + n) XOR n.

This page as a plain text file.
%I A182389 #32 Nov 26 2024 15:55:27
%S A182389 1,3,7,9,9,11,23,25,41,59,79,81,81,83,111,113,145,179,215,249,281,315,
%T A182389 327,329,377,395,447,449,449,451,511,513,513,515,519,521,521,523,535,
%U A182389 537,617,699,719,721,721,723,815,881,913,1011,1047,1145,1177,1275,1287
%N A182389 a(0)=1, a(n) = (a(n-1) + n) XOR n.
%C A182389 a(n) >= n.
%C A182389 a(n) >= a(n-1). - _Daniel Leary_, Aug 21 2016
%H A182389 Paolo Xausa, <a href="/A182389/b182389.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Ivan Panchenko)
%F A182389 a(0)=1, a(n)=(a(n-1) + n) XOR n, where XOR is the bitwise exclusive-OR operator.
%e A182389 a(5) = (a(4)+5) XOR 5 = (9+5) XOR 5 = 14 XOR 5 = 11.
%t A182389 Module[{n = 0}, NestList[BitXor[++n, # + n] &, 1, 100]] (* _Paolo Xausa_, Nov 26 2024 *)
%o A182389 (Python)
%o A182389 a=1
%o A182389 for i in range(1,55):
%o A182389     print(a, end=',')
%o A182389     a += i
%o A182389     a ^= i
%Y A182389 Cf. A182242, A182247, A237054.
%K A182389 nonn,base,easy
%O A182389 0,2
%A A182389 _Alex Ratushnyak_, Apr 27 2012