[go: up one dir, main page]

login
A037315
Numbers whose base-3 and base-10 expansions have the same digit sum.
2
1, 2, 21, 22, 23, 40, 41, 80, 111, 112, 113, 132, 133, 134, 150, 151, 152, 204, 205, 206, 222, 223, 224, 312, 313, 314, 350, 420, 421, 422, 440, 510, 511, 512, 530, 600, 601, 602, 800, 1014, 1015, 1016, 1032, 1033, 1034, 1070, 1140
OFFSET
1,2
COMMENTS
A007953(a(n)) = A053735(a(n)); A180019(a(n)) = 0. -Reinhard Zumkeller, Aug 06 2010
LINKS
MAPLE
filter:= n -> convert(convert(n, base, 3), `+`)=convert(convert(n, base, 10), `+`):
select(filter, [$1..10000]); # Robert Israel, Mar 11 2018
MATHEMATICA
Select[Range[1200], Total[IntegerDigits[#]]==Total[IntegerDigits[#, 3]]&] (* Harvey P. Dale, May 11 2018 *)
PROG
(PARI) isok(n) = sumdigits(n, 3) == sumdigits(n, 10); \\ Michel Marcus, Mar 12 2018
CROSSREFS
KEYWORD
nonn,base,look
STATUS
approved