HackerTrans
TopNewTrendsCommentsPastAskShowJobs

marethyu

no profile record

comments

marethyu
·29 hari yang lalu·discuss
nvm, I found it in archive.org
marethyu
·29 hari yang lalu·discuss
Does anyone know where can I find contents for the 2020 gigaleak?
marethyu
·6 bulan yang lalu·discuss
I just created my account so I can buy/sell gunplas
marethyu
·7 bulan yang lalu·discuss
$45 USD is equivalent to about 63 CAD. This is crazy considering that I brought 4GB one last year for $70 CAD.
marethyu
·8 bulan yang lalu·discuss
I think it also explains why most people don't rate after transactions in Facebook marketplace.
marethyu
·8 bulan yang lalu·discuss
I attempted the problem myself before reading your solution. My strategy is bit different: for every N>285, I check whether there exists a positive integer solution n to two equations T_N=P_n and T_N=H_n. Using basic algebra and quadratic formula, it boils down to checking whether the quantities 1+12(NN+N) and 1+4(NN+N) are perfect squares. If they are perfect squares, denote their squares by x and y. The next step is to check if 1+x is divisible by 6 and if 1+y is divisible by 4. They are easy using % operator.

    from math import sqrt

    def isPerfectSquare(n):
        sr = int(sqrt(n))
        return sr * sr == n

    for N in range(1, 10000000000):
        foo = 1 + 12*(N*N + N)
        bar = 1 + 4*(N*N + N)
        if isPerfectSquare(foo) and isPerfectSquare(bar):
            x, y = int(sqrt(foo)), int(sqrt(bar))
            if (1+x)%6 == 0 and (1+y)%4 == 0:
                print(f'Candidate found: N={N}, T_N={N*(N+1)/2}')
marethyu
·4 tahun yang lalu·discuss
Classical Mechanics by Taylor

Relearning mechanics from first principles is fun!