A198682 Nonnegative multiples of 3 whose sum of base-3 digits are of the form 3*k+2.
6, 12, 18, 30, 36, 51, 54, 69, 75, 84, 90, 105, 108, 123, 129, 141, 147, 153, 162, 177, 183, 195, 201, 207, 219, 225, 240, 246, 252, 267, 270, 285, 291, 303, 309, 315, 324, 339, 345, 357, 363, 369, 381, 387, 402, 411, 417, 423, 435, 441, 456, 459, 474, 480, 486
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Chris Bernhardt, Evil twins alternate with odious twins, Math. Mag. 82 (2009), pp. 57-62.
- Eric Weisstein's World of Mathematics, Prouhet-Tarry-Escott Problem
Programs
-
Maple
select(t -> convert(convert(t,base,3),`+`) mod 3 = 2, [seq(3*i,i=1..1000)]); # Robert Israel, Mar 04 2016
-
Mathematica
Select[Range[3, 498, 3], IntegerQ[(-2 + Plus@@IntegerDigits[#, 3])/3] &] (* Alonso del Arte, Nov 02 2011 *)
-
PARI
isok(n) = !(n % 3) && !((vecsum(digits(n, 3)) - 2) % 3); \\ Michel Marcus, Mar 02 2016
Extensions
Offset corrected by Michel Marcus, Mar 02 2016
Comments