Show HN: Math Puzzle

Show HN: Math Puzzle
1 point by lordmax 1 hour ago | hide | past | web | favorite | discuss
Paste ‘big.js’ [1] into your web console. Run the following code – can you figure out WHY it works and what it represents?

  let printN=(maxN)=> {
   let nextVal=(x,n)=> { 
    let b2=new Big(2);
    let val=b2.pow(n).mul(3).mul(b2.minus(x).sqrt());
    console.log(val.toString()); 
    return x.plus(2).sqrt(); 
  };

  let s=(new Big(3)).sqrt().plus(2).sqrt();
  for (let n=2; n

[1] Big decimal: https://raw.githubusercontent.com/MikeMcl/big.js/master/big.min.js

[2] Try on JSFiddle: https://jsfiddle.net/asgxL84y/

[3] The math: https://pasteboard.co/JeNGeB0.png


Guidelines
| FAQ
| Support
| API
| Security
| Lists
| Bookmarklet
| Legal
| Apply to YC
| Contact

Read More

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

scroll to top