[math-fun] Chernick numbers
"J. Chernick[6] <http://en.wikipedia.org/wiki/Carmichael_number#cite_note-Chernick1939-6> proved a theorem in 1939 which can be used to construct a subset <http://en.wikipedia.org/wiki/Subset> of Carmichael numbers. The number [image: (6k + 1)(12k + 1)(18k + 1)] is a Carmichael number if its three factors are all prime." (I used to think these were the only Carmichael numbers.) Isn't it fairly immediate that this can be simplified to p*(2p-1)*(3p-2), p>3, all three factors prime, since 2p-1 can't be prime when mod(p,6)=5? --rwg
Yes, it's fairly immediate. (Though the quoted formula is more explicit.) --Dan P.S. Can someone please tell me why my naïve Mma summation NSum[1/(Prime[k]^2 - 1), {k,1,Infinity}] gets the output: ----- Prime::intpp: Positive integer argument expected in Prime[16.]. Prime::intpp: Positive integer argument expected in Prime[17.]. Prime::intpp: Positive integer argument expected in Prime[18.]. General::stop: Further output of Prime::intpp will be suppressed during this calculation. Out[20]= 0.550863 ----- I mean, who asked it to put a float into Prime[] ? (Not me.) (The actual value is about .55618 .)
On Nov 28, 2014, at 7:53 PM, Bill Gosper <billgosper@gmail.com> wrote:
"J. Chernick[6] <http://en.wikipedia.org/wiki/Carmichael_number#cite_note-Chernick1939-6> proved a theorem in 1939 which can be used to construct a subset <http://en.wikipedia.org/wiki/Subset> of Carmichael numbers. The number [image: (6k + 1)(12k + 1)(18k + 1)] is a Carmichael number if its three factors are all prime." (I used to think these were the only Carmichael numbers.) Isn't it fairly immediate that this can be simplified to p*(2p-1)*(3p-2), p>3, all three factors prime, since 2p-1 can't be prime when mod(p,6)=5? --rwg _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Dan: Of course you asked it to invoke floating-point arithmetic, that's what NSum[] does. You can try to get around that explicitly, like this: In[1]:= NSum[1/(Prime[Round[k]]^2 - 1), {k,1,Infinity}] Now the error message gives more insight into what it's thinking: NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in k near {k} = {64.724}. NIntegrate obtained 0.00369981 and 5.43559 10^-6 for the integral and error estimates. Prime::intpp: Positive integer argument expected in Prime[16.]. -2. Prime[Round[k]] Prime'[Round[k]] Round'[k] NSum::nsnum: Summand (or its derivative) ---------------------------------------------- is not numerical at point k = 16. 2 2 (-1. + Prime[Round[k]] ) 1 Out[1]= NSum[--------------------, {k, 1, Infinity}] 2 Prime[Round[k]] - 1 If you just want it to add up the damn numbers, you can always In[2]:= Plus @@ N[Table[1/(Prime[k]^2-1), {k,1,10000000}],20] Out[2]= 0.55169329737778261329 --Michael On Sat, Nov 29, 2014 at 12:01 AM, Dan Asimov <dasimov@earthlink.net> wrote:
That is, .55168 .
On Nov 28, 2014, at 8:53 PM, Dan Asimov <dasimov@earthlink.net> wrote:
(The actual value is about .55618 .)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Forewarned is worth an octopus in the bush.
Michael Kleber:
If you just want it to add up the damn numbers, you can always
In[2]:= Plus @@ N[Table[1/(Prime[k]^2-1), {k,1,10000000}],20] Out[2]= 0.55169329737778261329
The caveat being that only 9 digits are good. Going to 10^8 gives you 10 digits. Fortunately we have http://oeis.org/A154945 to compare.
You can slightly accelerate convergence using the asymptotics of the remainder: f[n_] := Total[N[Table[1/(Prime[k]^2 - 1), {k, 1, n}], 20]] g[n_] := (2 n Log[2 n]^2 f[2 n] - n Log[n]^2 f[n])/(2 n Log[2 n]^2 - n Log[n]^2 ) f[1000000] 0.55169329396767431759 (8 digits) g[1000000] 0.5516932976276071989 (10 digits) -Veit
On Nov 29, 2014, at 9:25 AM, Michael Kleber <michael.kleber@gmail.com> wrote:
Dan: Of course you asked it to invoke floating-point arithmetic, that's what NSum[] does.
You can try to get around that explicitly, like this:
In[1]:= NSum[1/(Prime[Round[k]]^2 - 1), {k,1,Infinity}]
Now the error message gives more insight into what it's thinking:
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in k near {k} = {64.724}. NIntegrate obtained 0.00369981 and 5.43559 10^-6 for the integral and error estimates.
Prime::intpp: Positive integer argument expected in Prime[16.].
-2. Prime[Round[k]] Prime'[Round[k]] Round'[k] NSum::nsnum: Summand (or its derivative) ---------------------------------------------- is not numerical at point k = 16. 2 2 (-1. + Prime[Round[k]] )
1 Out[1]= NSum[--------------------, {k, 1, Infinity}] 2 Prime[Round[k]] - 1
If you just want it to add up the damn numbers, you can always
In[2]:= Plus @@ N[Table[1/(Prime[k]^2-1), {k,1,10000000}],20] Out[2]= 0.55169329737778261329
--Michael
On Sat, Nov 29, 2014 at 12:01 AM, Dan Asimov <dasimov@earthlink.net> wrote:
That is, .55168 .
On Nov 28, 2014, at 8:53 PM, Dan Asimov <dasimov@earthlink.net> wrote:
(The actual value is about .55618 .)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Forewarned is worth an octopus in the bush. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (5)
-
Bill Gosper -
Dan Asimov -
Hans Havermann -
Michael Kleber -
Veit Elser