login
Starting with a(1)=1 and a(2)=2: if m is a term then also 4*m and 4*m+3.
4

%I #14 Aug 02 2013 17:30:26

%S 1,2,4,7,8,11,16,19,28,31,32,35,44,47,64,67,76,79,112,115,124,127,128,

%T 131,140,143,176,179,188,191,256,259,268,271,304,307,316,319,448,451,

%U 460,463,496,499,508,511,512,515,524,527,560,563,572,575,704,707,716

%N Starting with a(1)=1 and a(2)=2: if m is a term then also 4*m and 4*m+3.

%C Subsequence of A000069; A010060(a(n))=1; A000120(a(n)) mod 2 = 1;

%C A000079, A083420, A002042, A002089 are subsequences.

%H Reinhard Zumkeller, <a href="/A132679/b132679.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/OdiousNumber.html">Odious Number</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%t Union[Nest[Flatten[{#,4#,4#+3}]&,{1,2},4]] (* _Harvey P. Dale_, Aug 02 2013 *)

%o (Haskell)

%o import Data.Set (fromList, insert, deleteFindMin)

%o a132679 n = a132679_list !! (n-1)

%o a132679_list = f $ fromList [1,2] where

%o f s = m : f (insert (4*m) $ insert (4*m+3) s') where

%o (m,s') = deleteFindMin s

%o -- _Reinhard Zumkeller_, Oct 29 2011

%Y Cf. A179888. [From _Reinhard Zumkeller_, Jul 31 2010]

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Aug 26 2007