login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

LINKS

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

FORMULA

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

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

a(n) = A074400(n)/A000593(n) = 2*A000203(n)/A000593(n). - Ivan N. Ianakiev, Jul 04 2019

MATHEMATICA

a[n_]:=BitXor[2*n-1, 2*n+1]; a/@Range[100] (* Ivan N. Ianakiev, Jul 04 2019 *)

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 July 9 00:55 EDT 2020. Contains 335537 sequences. (Running on oeis4.)