login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Ivan Panchenko, Table of n, a(n) for n = 0..200

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

Adjacent sequences:  A204768 A204769 A204770 * A204772 A204773 A204774

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 28 11:38 EDT 2021. Contains 348329 sequences. (Running on oeis4.)