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!)
A204771 a(n) = a(n-1) XOR (a(n-2)*3). 2
0, 1, 1, 2, 1, 7, 4, 17, 29, 46, 121, 243, 408, 833, 1929, 3658, 6353, 12815, 30844, 61009, 100133, 216534, 514233, 930107, 1686288, 3352737, 8264081, 15163506, 27077825, 53153175, 133991380, 243114769, 428343405, 854649182, 2120804377, 3870970883, 6937439304 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = a(n-1) XOR (a(n-2)*3), where XOR is the bitwise exclusive-OR operator.
PROG
(Python)
prpr = 0
prev = 1
for i in range(99):
current = (prev)^(prpr*3)
print(prpr, end=', ')
prpr = prev
prev = current
CROSSREFS
Cf. A101624: a(n) = a(n-1) XOR (a(n-2)*2).
Cf. A101625: a(n) = a(n-1) XOR (a(n-2)*4).
Sequence in context: A124048 A087059 A120872 * A141512 A143877 A319464
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 07 2012
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 18:00 EDT 2024. Contains 371797 sequences. (Running on oeis4.)