OFFSET
1,1
COMMENTS
It appears that Sum[k^j, 0<=k<=2^n-1, k in A198680] = Sum[k^j, 0<=k<=2^n-1, k in A198681] = Sum[k^j, 0<=k<=2^n-1, k in A180682], for 0<=j<=n-1, which has been verified numerically in a number of cases. This is a generalization of Prouhet's Theorem (see the reference). To illustrate for j=3, we have Sum[k^3, 0<=k<=2^n-1, k in A198680] = {0, 0, 12636, 1108809, 94478400, 7780827681, 633724260624, 51425722195929, 4168024588857600,...}, Sum[k^3, 0<=k<=2^n-1, k in A198681] = {0, 27, 14580, 1095687, 94478400, 7780827681, 633724260624, 51425722195929, 4168024588857600,..., Sum[k^3, 0<=k<=2^n-1, k in A198682] = {0, 216, 7776, 1121931, 94478400, 7780827681, 633724260624, 51425722195929, 4168024588857600,...}, and it is seen that all three sums agree for n>=4=j+1.
For each m, the sequence contains exactly one of 9*m, 9*m+3, 9*m+6. - Robert Israel, Mar 04 2016
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
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 *)
PROG
(PARI) isok(n) = !(n % 3) && !((vecsum(digits(n, 3)) - 2) % 3); \\ Michel Marcus, Mar 02 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John W. Layman, Oct 28 2011
EXTENSIONS
Offset corrected by Michel Marcus, Mar 02 2016
STATUS
approved