A341003 Numbers whose sum of even digits and sum of odd digits differ by 2.
2, 11, 20, 101, 110, 114, 123, 132, 136, 141, 145, 154, 158, 163, 167, 176, 185, 189, 198, 200, 213, 231, 312, 316, 321, 334, 338, 343, 356, 361, 365, 378, 383, 387, 411, 415, 433, 451, 514, 518, 536, 541, 558, 563, 581, 585, 613, 617, 631, 635, 653, 671, 716, 738, 761, 783
Offset: 1
Links
- Carole Dubois, Table of n, a(n) for n = 1..5001
Programs
-
Mathematica
Select[Range[1000], Abs[Plus @@ Select[(d = IntegerDigits[#]), OddQ] - Plus @@ Select[d, EvenQ]] == 2 &] (* Amiram Eldar, Feb 02 2021 *)