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!)
A182510 a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) - a(n-2). 1
0, 1, 3, -1, -8, -2, 0, 9, 1, -1, -12, 0, 24, 21, 3, -9, -28, -2, 8, 29, 1, -9, -32, 0, 56, 33, 3, -9, -24, -2, -8, -23, -47, 7, 84, 112, 0, -75, -109, -1, 68, 110, 0, -67, -111, -1, 64, 112, 0, -63, -13, -1, -40, -18, 0, 73, 113, -1, -172, -144, -8, 85, 115 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Conjectures: the sequence contains 8 zeros, and more positive terms than negative.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
FORMULA
a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) - a(n-2), where XOR is the bitwise exclusive-or operator.
PROG
(Python)
prpr = 0
prev = 1
for n in range(2, 99):
current = (prev ^ n) - prpr
print prpr,
prpr = prev
prev = current
(PARI) v=vector(100); v[1]=0; v[2]=1; for(i=3, #v, v[i]=bitxor(v[i-1], i-1)-v[i-2]); v \\ Charles R Greathouse IV, May 03 2012
CROSSREFS
Cf. A182509.
Sequence in context: A319045 A347134 A360705 * A112420 A010288 A143291
KEYWORD
sign,easy
AUTHOR
Alex Ratushnyak, May 03 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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)