A079498 Numbers whose sum of digits in base b gives 0 (mod b), for b = 3.
0, 5, 7, 11, 13, 15, 19, 21, 26, 29, 31, 33, 37, 39, 44, 45, 50, 52, 55, 57, 62, 63, 68, 70, 74, 76, 78, 83, 85, 87, 91, 93, 98, 99, 104, 106, 109, 111, 116, 117, 122, 124, 128, 130, 132, 135, 140, 142, 146, 148, 150, 154, 156, 161, 163, 165, 170, 171, 176, 178, 182, 184
Offset: 1
Examples
83 is a term since 83 = (1,0,0,0,2)_3 and 1 + 0 + 0 + 0 + 2 = 3 == 0 (mod 3).
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Ev = Function[{b, x}, vx = IntegerDigits[x, b]; Mod[Apply[Plus, vx], b]]; Seq = Function[{b, n}, Flatten[Position[Table[Ev[b, k], {k, 0, n}], 0]] - 1]; sb = Seq[3, 1000]
Extensions
a(1) = 0 inserted and offset corrected by Amiram Eldar, Jan 05 2020
Comments