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

%I #24 May 03 2021 06:57:11

%S 1,3,7,9,9,11,23,25,41,59,79,81,81,83,111,113,145,179,215,249,281,315,

%T 327,329,377,395,447,449,449,451,511,513,513,515,519,521,521,523,535,

%U 537,617,699,719,721,721,723,815,881,913,1011,1047,1145

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

%C a(n) >= n.

%C a(n) >= a(n-1). - _Daniel Leary_, Aug 21 2016

%H Ivan Panchenko, <a href="/A182389/b182389.txt">Table of n, a(n) for n = 0..1000</a>

%F a(0)=1, a(n)=(a(n-1) + n) XOR n, where XOR is the bitwise exclusive-OR operator.

%e a(5) = (a(4)+5) XOR 5 = (9+5) XOR 5 = 14 XOR 5 = 11.

%o (Python)

%o a=1

%o for i in range(1,55):

%o print(a, end=',')

%o a += i

%o a ^= i

%Y Cf. A182242, A182247.

%K nonn,base

%O 0,2

%A _Alex Ratushnyak_, Apr 27 2012