This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A198682 #27 Feb 16 2025 08:33:16 %S A198682 6,12,18,30,36,51,54,69,75,84,90,105,108,123,129,141,147,153,162,177, %T A198682 183,195,201,207,219,225,240,246,252,267,270,285,291,303,309,315,324, %U A198682 339,345,357,363,369,381,387,402,411,417,423,435,441,456,459,474,480,486 %N A198682 Nonnegative multiples of 3 whose sum of base-3 digits are of the form 3*k+2. %C A198682 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. %C A198682 For each m, the sequence contains exactly one of 9*m, 9*m+3, 9*m+6. - _Robert Israel_, Mar 04 2016 %H A198682 Robert Israel, <a href="/A198682/b198682.txt">Table of n, a(n) for n = 1..10000</a> %H A198682 Chris Bernhardt, <a href="http://www.jstor.org/stable/27643161">Evil twins alternate with odious twins</a>, Math. Mag. 82 (2009), pp. 57-62. %H A198682 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Prouhet-Tarry-EscottProblem.html">Prouhet-Tarry-Escott Problem</a> %p A198682 select(t -> convert(convert(t,base,3),`+`) mod 3 = 2, [seq(3*i,i=1..1000)]); # _Robert Israel_, Mar 04 2016 %t A198682 Select[Range[3, 498, 3], IntegerQ[(-2 + Plus@@IntegerDigits[#, 3])/3] &] (* _Alonso del Arte_, Nov 02 2011 *) %o A198682 (PARI) isok(n) = !(n % 3) && !((vecsum(digits(n, 3)) - 2) % 3); \\ _Michel Marcus_, Mar 02 2016 %Y A198682 Cf. A000069, A001969, A157971, A158704, A198680, A198681. %K A198682 nonn,base %O A198682 1,1 %A A198682 _John W. Layman_, Oct 28 2011 %E A198682 Offset corrected by _Michel Marcus_, Mar 02 2016