harshad numbers & the two-way ones

a number is harshad (or niven) if it's divisible by the sum of its digits. a number is two-way if it and its reverse are both harshad.

12 is two-way: digit sum 3, and 3 divides 12. reversed, 21 has digit sum 3, and 3 divides 21. 13 is not: digit sum 4, and 4 doesn't divide 13. a reversed number drops leading zeros, so 120 reads back as 21.

neither harshad only two-way two-way & palindromic

the palindromic two-way numbers (purple) are the ones that are their own reverse and harshad: a number whose digit sum divides it and whose mirror is itself. only 25 of them below 3000.

this page answers a Cloud Brain puzzle (2026-W47): how many two-way numbers from 1 to 3000? the grid is 1..3000, one cell each, row-major, 60 per row. the count is .