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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A237054 a(1)=1, a(n) = (a(n-1) + n) XOR n. 0
1, 1, 7, 15, 17, 17, 31, 47, 49, 49, 55, 79, 81, 81, 111, 111, 145, 177, 215, 255, 257, 257, 271, 319, 321, 321, 327, 383, 385, 385, 447, 511, 513, 513, 519, 527, 529, 529, 543, 623, 689, 753, 823, 847, 849, 849, 943, 1007, 1041, 1137, 1175, 1279, 1281, 1281 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..54.

FORMULA

a(1)=1, then a(n) = (a(n-1) + n) XOR n, where XOR is the bitwise exclusive-OR operator.

PROG

(Python)

a=1

for n in range(2, 77):

  print str(a)+', ',

  a = (a+n) ^ n

CROSSREFS

Cf. A182389, A182242.

Sequence in context: A180114 A204740 A244536 * A216848 A065566 A154618

Adjacent sequences:  A237051 A237052 A237053 * A237055 A237056 A237057

KEYWORD

nonn,easy

AUTHOR

Alex Ratushnyak, Feb 03 2014

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 March 21 04:59 EDT 2019. Contains 321364 sequences. (Running on oeis4.)