Happy 4/20 Day 2018

Let W E E D ( x ) = 4 x + 20 WEED(x) = 4x + 20 and W E E D y ( x ) WEED_{y}(x) be a recursive function such that W E E D ( W E E D ( . . . WEED(WEED(... is iterated y y times. What are the last 33 digits of W E E D 420 ( 420 ) WEED_{420}(420) ?


The answer is 618590466360255786349832360864420.

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.

3 solutions

Zeeshan Ali
Apr 28, 2018
1
2
3
4
5
6
def WEED(x, y=1):
    if y==1:
        return 4*x+20
    return 4*WEED(x, y-1)+20

print (int(str(WEED(420, 420))[-33:]))

1
618590466360255786349832360864420

Giorgos K.
Apr 25, 2018

here is a M a t h e m a t i c a Mathematica code

Nest[4#+20&,420,420]~Mod~(10^33)

returns 618590466360255786349832360864420 618590466360255786349832360864420

Stefan Popescu
Apr 20, 2018

There's no easy way to do this, so the best way is to write a computer program which will do what would normally take you weeks to calculate. This is a program written in Python 3.4. It can be seen that the full value of n n is a whopping 256 digits!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...