User Portlet
Discussions |
---|
Thank you for this. One more thing, as your code is a little obscure to me in terms of how exactly it works. If I wanted the fixed points of a single number (i.e., {4,7,12} for 13), what needs to change? |
OEIS [A071873][1] is an example of a selvage constant for which I would like to calculate millions/billions of digits. There *is* Mathematica code on the site but it does not scale very well. Using it, I run out of RAM after only a few hundred... |
This was done in version 10.0.1 on a 4-year-old iMac running Yosemite: s = {27168, 27240, 27252, 27360}; Do[ Print[s[[i]], " ", Timing[PrimeQ[(10^s[[i]]*78880 - 1)/3]]], {i, 4}] 27168 {92.583833,False} 27240 ... |
I'm looking for an instance of a prime for numbers of the form (10^n 78880-1)/3, where n is a positive integer. As a preliminary, it may be noted that n must be a multiple of 12. There are many other constraints based on division by small factors but... |
In a new line, one keyboards the variable(s) one wishes to inspect. Select that cell and pick **Evaluate in Subsession** from the **Evaluate** menu. I *think* that's all (no need for **Return[]**). Makes sense and is better than what was before. I... |
Beautiful! Thank you, Ilian, and thank you, Nayuki Minase. |
I have now done 400 IntegerDigits sums in 10.9 Mavericks without a single fail. In 10.8 I would have encountered about six incorrect results, so I'm reasonably convinced that what I had initially assumed was a Mathematica bug was in... |
Vitaliy: "Hans, could you please post your code - the one that causes trouble to your system?" It is identical to your code except that the 10^5 in ptsl = FoldList[onEsteP, {0, 0}, RealDigits[Pi, 8, 10^5][[1]]]; gets replaced with larger... |