login
This site is supported by donations to The OEIS Foundation.

 

Logo

The October issue of the Notices of the Amer. Math. Soc. has an article about the OEIS.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A182560 a(n) = (a(n-1) AND a(n-2)) XOR n. 3
0, 1, 2, 3, 6, 7, 0, 7, 8, 9, 2, 11, 14, 7, 8, 15, 24, 25, 10, 27, 30, 15, 24, 31, 0, 25, 26, 3, 30, 31, 0, 31, 32, 33, 2, 35, 38, 7, 32, 39, 8, 41, 34, 11, 46, 39, 8, 47, 56, 25, 42, 59, 30, 47, 56, 31, 32, 57, 26, 35, 62, 31, 32, 63, 96, 97, 34, 99, 102, 39, 96, 103 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Conjecture: sequence contains infinitely many zeros.

a(6*A000695(n)) = 0. [Reinhard Zumkeller, May 05 2012]

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Eric Weisstein's World of Mathematics, AND

Eric Weisstein's World of Mathematics, XOR

Wikipedia, Bitwise operation AND

Wikipedia, Bitwise operation XOR

FORMULA

a(0)=0, a(1)=1, a(n) = (a(n-1) AND a(n-2)) XOR n, where AND is the bitwise AND operator, XOR is the bitwise exclusive-or operator.

PROG

(Python)

prpr = 0

prev = 1

for n in range(2, 55):

.  current = (prev & prpr) ^ n

.  print prpr,

.  prpr = prev

.  prev = current

(Haskell)

import Data.Bits ((.&.), xor)

a182560 n = a182560_list !! n

a182560_list = 0 : 1 : 2 : zipWith xor [3..]

   (tail $ zipWith (.&.) a182560_list $ tail a182560_list) :: [Integer]

-- Reinhard Zumkeller, May 05 2012

CROSSREFS

Cf. A182389, A182538.

Sequence in context: A015698 A068587 A218954 * A298750 A001058 A114462

Adjacent sequences:  A182557 A182558 A182559 * A182561 A182562 A182563

KEYWORD

nonn,base,easy

AUTHOR

Alex Ratushnyak, May 05 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 22:27 EDT 2018. Contains 315360 sequences. (Running on oeis4.)