A079495 Numbers k such that the sum of the squares of the digits of k in base 3 is 0 (mod 3).
0, 13, 14, 16, 17, 22, 23, 25, 26, 31, 32, 34, 35, 37, 38, 39, 42, 46, 47, 48, 51, 58, 59, 61, 62, 64, 65, 66, 69, 73, 74, 75, 78, 85, 86, 88, 89, 91, 92, 93, 96, 100, 101, 102, 105, 109, 110, 111, 114, 117, 126, 136, 137, 138, 141, 144, 153, 166, 167, 169, 170, 172, 173
Offset: 1
Examples
59 is a member because 59 = 2013_3 and 2^2+0^2+1^2+1^2 = 6 = 0 (mod 3).
Programs
-
Mathematica
Ev = Function[{b, x}, vx = IntegerDigits[x, b]; Mod[vx.vx, b]]; Seq = Function[{b, n}, Flatten[Position[Table[Ev[b, k], {k, 1, n}], 0]]]; Seq[3, 1000]
Extensions
Revised by Sean A. Irvine, Aug 17 2025
Comments