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!)
A100892 a(n) = (2*n-1) XOR (2*n+1), bitwise. 3
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
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
(Python)
def A100892(n): return ((~n& n-1)<<2)+2 # Chai Wah Wu, Jul 07 2022
CROSSREFS
Cf. A005408.
Sequence in context: A079462 A189218 A122663 * A351839 A324189 A319543
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 13:34 EDT 2024. Contains 372387 sequences. (Running on oeis4.)