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!)
A182506 a(0)=0, a(1)=1, a(n) = ( (a(n-1)+a(n-2)) XOR n) + n. 0
0, 1, 5, 8, 13, 21, 42, 63, 105, 170, 291, 465, 772, 1253, 2037, 3300, 5337, 8637, 13974, 22611, 36625, 59270, 95895, 155169, 251064, 406233, 657317, 1063552, 1720917, 2784485, 4505410, 7289943, 11795417, 19085362, 30880843, 49966209, 80847116, 130813389, 211660581 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = ( (a(n-1)+a(n-2)) XOR n) + n, where XOR is the bitwise exclusive-or operator.
MATHEMATICA
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==BitXor[a[n-1]+a[n-2], n]+n}, a, {n, 40}] (* Harvey P. Dale, Oct 29 2012 *)
PROG
(Python)
prpr = 0
prev = 1
for n in range(2, 99):
current = n + ((prpr + prev) ^ n)
print prpr,
prpr = prev
prev = current
CROSSREFS
Sequence in context: A369222 A369220 A364526 * A314465 A314466 A314467
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 02 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 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)