Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. 1 [1, 1, 1]
  2. 2 [3, 5, 6]
  3. 3 [6, 7, 10]
  4. 4 [11, 29, 36]
  5. 5 [14, 47, 56]
  6. 6 [47, 59, 100]
  7. 7 [59, 110, 162]
  8. 8 [23, 241, 256]
  9. 9 [31, 239, 261]
  10. 10 [187, 239, 416]
  11. 11 [447, 620, 1056]
  12. 12 [239, 1853, 2080]
  13. 13 [1439, 1775, 3201]
  14. 14 [1663, 2735, 4384]
  15.  
  16. allocatemem(2^28)
  17. {
  18. M(v, P,Q) =
  19. m = v; P = vector(v+1,i,binomial(v,i-1));
  20. while(1,
  21. m++; P = concat(0,P) + concat(P,0); Q = P % prod(i=0,v-1,m-i);
  22. for(a=1,m2, if(Q[a+1]==0, return([a,m-a,m-v])))
  23. )
  24. }
  25. for(v=1,14,print(v,M(v)))
  26.  
  27. 3, 5, 6, 2
  28. 6, 7, 10, 3
  29. 11, 29, 36, 4
  30. 14, 47, 56, 5
  31. 47, 59, 100, 6
  32. 59, 110, 162, 7
  33. 23, 241, 256, 8
  34. 31, 239, 261, 9
  35. 187, 239, 416, 10
  36. 447, 620, 1056, 11
  37. 239, 1853, 2080, 12
  38. 1439, 1775, 3201, 13
  39. 1663, 2735, 4384, 14
  40. 14335, 18458, 32778, 15
  41. 9209, 23615, 32808, 16
  42. 13106, 52447, 65536, 17
  43. 26207, 39347, 65536, 18
  44. 34719, 227444, 262144, 19
  45. 109237, 152927, 262144, 20
  46. 59039, 465398, 524416, 21
  47. 230111, 294839, 524928, 22
  48. 496123, 3698204, 4194304, 23
  49. 1007871, 3186457, 4194304, 24
  50. 983546, 7405087, 8388608, 25
  51. 1029947, 7358687, 8388608, 26
  52. 527036, 33027423, 33554432, 27
  53. 2479487, 31074973, 33554432, 28
  54.  
  55. 2, 3, 4, 1
  56. 2, 7, 8, 1
  57. 5, 14, 16, 3
  58. 9, 26, 32, 3
  59. 19, 49, 64, 4
  60. 17, 116, 128, 5
  61. 23, 241, 256, 8
  62. 53, 467, 512, 8
  63. 314, 719, 1024, 9
  64. 482, 1574, 2048, 8
  65. 1943, 2164, 4096, 11
  66. 1979, 6227, 8192, 14
  67. 3317, 13081, 16384, 14
  68. 6548, 26234, 32768, 14
  69. 26207, 39347, 65536, 18
  70. 56375, 74354, 131072, 17
  71. 109237, 152927, 262144, 20
  72. 58559, 465749, 524288, 20
  73. 117350, 931247, 1048576, 21
  74. 511613, 1585561, 2097152, 22
  75. 1007871, 3186457, 4194304, 24
  76. 1029947, 7358687, 8388608, 26
  77. 839773, 15937469, 16777216, 26
  78. 2479487, 31074973, 33554432, 28
  79. 28499711, 38609183, 67108864, 30
  80. 13640318, 120577439, 134217728, 29
  81. 26335607, 242099879, 268435456, 30
  82. 149450463, 387420479, 536870912, 30
  83. 42571871, 1031169982, 1073741824, 30
  84. 210421817, 1937061863, 2147483648, 32
  85. 808182959, 3486784371, 4294967296, 34
  86. 66684221, 8523250405, 8589934592, 34
  87. 57373109, 17122496111, 17179869184, 36
  88. 1071383543, 33288354863, 34359738368, 38
  89. 194490575, 68524986199, 68719476736, 38
  90. 722568911, 136716384599, 137438953472, 38
  91. 2908726651, 27196918033, 274877906944, 40
  92. 5820696123, 543935117807, 549755813888, 42
  93. 275025321599, 824486306219, 1099511627776, 42 (?)
  94.  
  95. c_curr = c_head + offsets[i];
  96. while(c_curr <= c_tail) {
  97. *c_curr = 0;
  98. c_curr+=this_prime;
  99. }
  100.  
  101. offsets[i] = (c_curr - c_head) - (BUFFER_SIZE);
  102. if (offsets[i] == this_prime)
  103. offsets[i] = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement