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”).

A135111
Numbers such that the digital sum base 2 and the digital sum base 3 are in a ratio of 2:3.
1
5, 33, 78, 106, 116, 142, 150, 154, 156, 170, 178, 184, 202, 204, 210, 215, 226, 228, 278, 284, 294, 308, 312, 332, 338, 340, 344, 356, 377, 390, 396, 418, 420, 424, 450, 455, 467, 473, 483, 513, 526, 534, 550, 582, 586, 588, 596, 600, 612, 619, 624, 629
OFFSET
1,1
LINKS
EXAMPLE
a(1)=5, since ds_2(5):ds_3(5)=2:3.
MAPLE
select(t -> convert(convert(t, base, 3), `+`)/convert(convert(t, base, 2), `+`) = 3/2, [$1..1000]); # Robert Israel, Sep 26 2016
MATHEMATICA
Select[Range[500], 3*Total[IntegerDigits[#, 2]] == 2*Total[IntegerDigits[#, 3]] &] (* G. C. Greubel, Sep 26 2016 *)
PROG
(PARI) isok(n) = 2*vecsum(digits(n, 3)) == 3*vecsum(digits(n, 2)); \\ Michel Marcus, Sep 26 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Dec 24 2007
STATUS
approved