%I #40 Oct 26 2023 22:52:14
%S 3,6,7,11,12,13,14,15,19,22,23,24,25,26,27,28,29,30,31,35,38,39,43,44,
%T 45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,67,70,71,75,
%U 76,77,78,79,83,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
%N Binary expansion contains 2 adjacent 1's.
%C 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
%C 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
%C A048728(a(n)) > 0. - _Reinhard Zumkeller_, May 13 2014
%H Reinhard Zumkeller, <a href="/A004780/b004780.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F a(n) ~ n. - _Charles R Greathouse IV_, Sep 19 2012
%p q:= n-> verify([1$2], Bits[Split](n), 'sublist'):
%p select(q, [$0..200])[]; # _Alois P. Heinz_, Oct 22 2021
%o (PARI) is(n)=bitand(n,n+n)>0 \\ _Charles R Greathouse IV_, Sep 19 2012
%o (Haskell)
%o a004780 n = a004780_list !! (n-1)
%o a004780_list = filter ((> 1) . a048728) [1..]
%o -- _Reinhard Zumkeller_, May 13 2014
%o (Python)
%o from itertools import count, islice
%o def A004780_gen(startvalue=1): # generator of terms >= startvalue
%o return filter(lambda n:n&(n<<1), count(max(startvalue,1)))
%o A004780_list = list(islice(A004780_gen(),30)) # _Chai Wah Wu_, Jul 13 2022
%Y Cf. A005809, A048728, A242408.
%Y Complement: A003714.
%Y Subsequences (apart from any initial zero-term): A001196, A004755, A004767, A033428, A277335.
%K nonn,easy,base
%O 1,1
%A _N. J. A. Sloane_
%E Offset corrected by _Reinhard Zumkeller_, Jul 28 2010
|