The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A204771 a(n) = a(n-1) XOR (a(n-2)*3). 2

%I

%S 0,1,1,2,1,7,4,17,29,46,121,243,408,833,1929,3658,6353,12815,30844,

%T 61009,100133,216534,514233,930107,1686288,3352737,8264081,15163506,

%U 27077825,53153175,133991380,243114769,428343405,854649182,2120804377,3870970883,6937439304

%N a(n) = a(n-1) XOR (a(n-2)*3).

%H Ivan Panchenko, <a href="/A204771/b204771.txt">Table of n, a(n) for n = 0..200</a>

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

%o (Python)

%o prpr = 0

%o prev = 1

%o for i in range(99):

%o current = (prev)^(prpr*3)

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

%o prpr = prev

%o prev = current

%Y Cf. A101624: a(n) = a(n-1) XOR (a(n-2)*2).

%Y Cf. A101625: a(n) = a(n-1) XOR (a(n-2)*4).

%K nonn,base,easy

%O 0,4

%A _Alex Ratushnyak_, May 07 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 7 04:21 EST 2021. Contains 349567 sequences. (Running on oeis4.)