A037316 Numbers whose base-4 and base-5 expansions have the same digit sum.
1, 2, 3, 28, 29, 40, 41, 42, 43, 52, 53, 54, 76, 77, 78, 79, 90, 91, 100, 101, 102, 103, 115, 136, 137, 138, 139, 160, 161, 162, 163, 188, 189, 210, 211, 236, 237, 238, 239, 270, 271, 280, 281, 282, 283, 295, 305, 306, 307, 330, 331
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= n -> convert(convert(n,base,4),`+`)=convert(convert(n,base,5),`+`): select(filter, [$1..1000]); # Robert Israel, Mar 11 2018
-
Mathematica
Select[Range[400],Total[IntegerDigits[#,4]]==Total[IntegerDigits[#,5]]&] (* Harvey P. Dale, Sep 15 2018 *)
-
PARI
isok(k) = sumdigits(k, 4) == sumdigits(k, 5); \\ Michel Marcus, Jun 02 2021