login
Numbers n such that the binary expansion of n contains the base 3 expansion of n as a substring.
2

%I #8 Oct 19 2013 05:00:14

%S 0,1,9,10,12,94,118,120,1002,1003,2217,22204,22602,26608,27004,27009,

%T 531795,774202,776424,776467,1604056,1616464,1660780,1673176,1673299,

%U 5021473,5039860,5039902,5039904,5042124,5321298,6384861,16495194,16495195

%N Numbers n such that the binary expansion of n contains the base 3 expansion of n as a substring.

%e 774202 = 10111101000000111010 (base 2)

%e 774202 = ...1110100000011.... (base 3)

%e 1604056 = 110000111100111011000 (base 2)

%e 1604056 = .10000111100111...... (base 3)

%t Do[i3=IntegerString[n,2];l3=StringLength[i3];i=FromDigits[i3,3]; i2=IntegerString[i,2];If[StringPosition[i2,i3]!={},Print[i]];,{n,0,10^7}];(* Ray Chandler*)

%Y Subsequence of A005836. Cf. A169828, A178679.

%K base,nonn

%O 1,3

%A _Zak Seidov_ and _Ray Chandler_, Jun 03 2010