login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers without consecutive repeated digits in base 2 and in base 3.
0

%I #11 Oct 29 2015 23:04:46

%S 1,2,5,10,21,1365,2730

%N Numbers without consecutive repeated digits in base 2 and in base 3.

%C Intersection of A000975 and A031941. - _Michel Marcus_, Oct 14 2015

%C It seems likely that there are no further terms.

%e 10 is 1010 in base 2 and 101 in base 3; no two of the same digit are next to one another and so 10 is a term.

%e Similarly 21 is 10101 in base 2 and 210 in base 3 so it is also a term.

%o (PARI) isokd(d) = {dd = vector(#d-1, k, abs(d[k+1]-d[k])); if (#dd, vecmin(dd), 1);}

%o isok(n) = isokd(binary(n)) && isokd(digits(n, 3)); \\ _Michel Marcus_, Oct 14 2015

%Y Cf. A000975 (base 2), A031941 (base 3).

%K nonn,base

%O 1,2

%A _Robin Powell_, Oct 13 2015