Binary or Septenary

Split the integers from 0 to 127 into two groups A and B such that sum of first, second, third, fourth, fifth and sixth powers of numbers in group A is equal to those in B, respectively.

i.e. A i A i p = B i B i p p { 1 , 2 , 3 , 4 , 5 , 6 } \text{i.e.} \sum_{\forall A_i}A_i^{p}= \sum_{\forall B_i}B_i^{p} \quad\quad\forall p\in\{1,2,3,4,5,6\}

Find the difference between their seventh power sum. That is, find

A i A i 7 B i B i 7 . \large\left|\sum_{\forall A_i}A_i^{7}- \sum_{\forall B_i}B_i^{7}\right|.


PS I don't know whether the solution I have is unique or not. So, if you get another solution and it satisfies conditions post it in this thread


The answer is 10569646080.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

David Hammond
Nov 9, 2019
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# The Prouhet–Tarry–Escott problem
# @see https://en.wikipedia.org/wiki/Thue%E2%80%93Morse_sequence#The_Prouhet%E2%80%93Tarry%E2%80%93Escott_problem

N = 128

thue_morse = [bin(n).count('1') % 2 for n in range(N)]

Sa = [i for i in range(N) if thue_morse[i] == 1]
Sb = [i for i in range(N) if thue_morse[i] == 0]

def sum_power(S, power):
  return sum([s**power for s in S])

for p in range(1, 8):
  print(p, abs(sum_power(Sa, p) - sum_power(Sb, p)))

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...