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!)
A004780 Binary expansion contains 2 adjacent 1's. 13
3, 6, 7, 11, 12, 13, 14, 15, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35, 38, 39, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 70, 71, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Complement of A003714. It appears that n is in the sequence if and only if C(3n,n) is even. - Benoit Cloitre, Mar 09 2003
Since the binary representation of these numbers contains two adjacent 1's, so for these values of n, we will have (n XOR 2n XOR 3n) != 0, and thus a two player Nim game with three heaps of (n, 2n, 3n) stones will be a winning configuration for the first player. - V. Raman, Sep 17 2012
A048728(a(n)) > 0. - Reinhard Zumkeller, May 13 2014
LINKS
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Sep 19 2012
MAPLE
q:= n-> verify([1$2], Bits[Split](n), 'sublist'):
select(q, [$0..200])[]; # Alois P. Heinz, Oct 22 2021
PROG
(PARI) is(n)=bitand(n, n+n)>0 \\ Charles R Greathouse IV, Sep 19 2012
(Haskell)
a004780 n = a004780_list !! (n-1)
a004780_list = filter ((> 1) . a048728) [1..]
-- Reinhard Zumkeller, May 13 2014
(Python)
from itertools import count, islice
def A004780_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:n&(n<<1), count(max(startvalue, 1)))
A004780_list = list(islice(A004780_gen(), 30)) # Chai Wah Wu, Jul 13 2022
CROSSREFS
Complement: A003714.
Subsequences (apart from any initial zero-term): A001196, A004755, A004767, A033428, A277335.
Sequence in context: A292608 A028754 A028795 * A359266 A292046 A051146
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Jul 28 2010
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)