A179970 Numbers such that in base-4 representation all sums of two adjacent digits are odd.
0, 1, 2, 3, 4, 6, 9, 11, 12, 14, 17, 19, 25, 27, 36, 38, 44, 46, 49, 51, 57, 59, 68, 70, 76, 78, 100, 102, 108, 110, 145, 147, 153, 155, 177, 179, 185, 187, 196, 198, 204, 206, 228, 230, 236, 238, 273, 275, 281, 283, 305, 307, 313, 315, 401, 403, 409, 411, 433, 435
Offset: 1
Examples
a(10)=14->base4:32->base2:1110; a(100)=1126->base4:101212->base2:10001100110; a(1000)=113043->base4:123212103->base2:11011100110010011.
Links
- R. Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Quaternary
- Index entries for 2-automatic sequences.
Programs
-
Mathematica
Select[Range[0,500],And@@OddQ[Total/@Partition[IntegerDigits[#,4],2,1]]&] (* Harvey P. Dale, Aug 19 2012 *)
Formula
Let m = a(floor((n-1)/2)), then for n > 3:
a(n) = 4*m - m mod 2 + 1 + 2*(1 - n mod 2).
Comments