Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. // finds the shape of a number, also called its angle.
  2. // 1/2 = a*a * cos(shape)
  3. //
  4. function findShape(x) {
  5. return Math.acos(.5 / x*x); // CORRECTION: a*a -> x*x
  6. }
  7.  
  8. // finds the sigma of a pair of numbers
  9. // 2 * acos( min( shapeA, shapeB ) / max( shapeA, shapeB ) )
  10. //
  11. function findSigma(a,b) {
  12. return 2 * Math.acos( Math.min(findShape(a), findShape(b)) / Math.max(findShape(a), findShape(b)) );
  13. }
  14.  
  15. // finds a prime number related to the first two primes, sometimes it's larger
  16. // than both, other times its between the two numbers, I've not found all the
  17. // properties yet
  18. //
  19. // round( 2 * sigma(a,b) / |shapeB - shapeA| )
  20. //
  21. function findAnotherPrime(a,b) {
  22. var sigma = findSigma(a,b);
  23. return Math.round(2 * sigma / Math.Abs(findShape(a), findShape(b)));
  24. }
  25.  
  26. // finds the delta of a primordial number
  27. //
  28. // a * b * |shapeB - shapeA| / sigma(a,b)
  29. //
  30. function findDelta(a,b) {
  31. var sigma = findSigma(a,b);
  32.  
  33. var deltaPrime = sigma / Math.Abs(findShape(b), findShape(a));
  34.  
  35. return a * b / deltaPrime;
  36. }
  37.  
  38. // a special calculated value that I found because our shape function actually
  39. // finds the shape of a number between 1 and that number, so this is the value
  40. // between 0 and 1 (found by experimentation)
  41. //
  42. var ShapeOfOne = 0.006817;
  43.  
  44. // finds the primordial of a pair of numbers, this is a special new type of
  45. // number that contains all prime numbers between 1/2 the primordial and 1
  46. // within it. You need to use your brain a little bit, as there are some
  47. // patterns to see and rounding to do, but otherwise this is a new field of
  48. // math, I believe.
  49. //
  50. // ShapeOfOne * Delta(a,b) / (shapeA - shapeB)
  51. //
  52. function findPrimordial(a, b) {
  53. x = findShape(a) - findShape(b);
  54. x = x / findDelta(a, b);
  55.  
  56. return ShapeOfOne / x;
  57. }
  58.  
  59. // Example Code, untested as of yet!
  60. //
  61. //
  62. var a = 53;
  63. var b = 117;
  64. var prime = 0;
  65. var primordial = 0;
  66.  
  67. // iterate over it 100 times, finding new primordials and new primes each time
  68. for (var i = 0; i < 100; i++ ) {
  69. prime = findAnotherPrime(a, b);
  70. primordial = findPrimordial(a, b);
  71.  
  72. a = b;
  73. b = prime;
  74.  
  75. console.log("Prime: ", prime);
  76. console.log("Primordial: ", primordial);
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement