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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100892 a(n) = (2*n-1) XOR (2*n+1), bitwise. 2
2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 126, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 254, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2, 6, 2, 62, 2, 6, 2, 14, 2, 6, 2, 30, 2, 6, 2, 14, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) = 2 * ((n-1) XOR n) = 2*A038712(n).

LINKS

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

FORMULA

a(n) = 4*2^A007814(n) - 2.

Recurrence: a(2n) = 2a(n) + 2, a(2n+1) = 2. - Ralf Stephan, Aug 21 2013

a(n) = A088837(n) - 1. - Filip Zaludek, Dec 10 2016

PROG

(PARI) a(n)=4*2^valuation(n, 2)-2; \\ Ralf Stephan, Aug 21 2013

(Haskell)

a100892 n = (2 * n - 1) `xor` (2 * n + 1)

a100892_list = zipWith xor (tail a005408_list) a005408_list

-- Reinhard Zumkeller, Sep 03 2013

CROSSREFS

Cf. A006519, A099820, A007088.

Cf. A005408.

Sequence in context: A079462 A189218 A122663 * A324189 A319543 A126287

Adjacent sequences:  A100889 A100890 A100891 * A100893 A100894 A100895

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Jan 10 2005

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 May 19 17:48 EDT 2019. Contains 323395 sequences. (Running on oeis4.)