The Second Pretty Easy Number Game

Number Theory Level pending

Pretty easy... How many 4-digit numbers satisfy:

a b c d = a 4 + b 4 + c 4 + d 4 \overline { abcd } ={ a }^{ 4 }+{ b }^{ 4 }+{ c }^{ 4 }+{ d }^{ 4 }

This is one of my problems in Game Of Numbers.


The answer is 3.

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

1
2
3
4
5
6
7
8
9
def digits(n, func):
    if n < 10:
        return func(n)
    else:
        return func(n%10) + digits(n//10, func)

for i in range(10**3, 10**4):
    if i == digits(i, lambda x: x**4):
        print(i)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...