N/2 - S where S is the sum of S_m from 0 to m_max for m's where 2m+3
is prime, where
S_0 = int((N-4)/6), S_m = int((N-4m^2 - 7m - 4)/(4m+6)), and
m_max = int(sqrt(8N-17)-7)/8.
So, for m_max = 2, S = S_0 + S_1 + S_2.
The first m that's dropped is m=3, since 2m+3 = 9, as it's not prime.
And the number of primes is N/2 - S.
Plugging in 24 for a quick test gives,
m_max = 0, S_0 = 3, which gives 9 primes.
James Harris
You don't know the meaning of "recursive." Uncle Al will help you,
http://www.mazepath.com/uncleal/sunshine.jpg
Recursive, cf: recursive.
Spewing idiot.
--
Uncle Al
http://www.mazepath.com/uncleal/
(Toxic URL! Unsafe for children and most mammals)
"Quis custodiet ipsos custodes?" The Net!
And how do we determine whether 2m+3 is prime or not?
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Well; at least there begin to be some justification that this formula is
indeed recursive.
> The recursive formula for the number of primes below an even number
> N>=18 is
[...]
Amazing, simply amazing. People have posted pi(n) for quite a few
large numbers, it would be child's work to verify something like the
above claim for the given cases.
How stupid must one be to keep spewing forth "corrections" for days
and days on end which keep missing the true values by orders of
magnitude, when the correct values are already given?
I knew that JSH was stupid, but his current streak of idiocy is even
surprising for his standards.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David....@t-online.de
<snip>
Crossover here:
6208 813 807
6210 814 807
6212 815 808
6214 815 808
6216 815 808
6218 815 809
6220 787 809
6222 788 810
6224 788 810
6226 787 810
(I don't think there are any more crossovers but I didn't check)
<snip>
Peaks about here:
16100 1112 1874
16102 1112 1874
16104 1113 1875
16106 1113 1875
16108 1112 1875
16110 1113 1875
16112 1114 1876
16114 1070 1876
16116 1070 1876
16118 1070 1876
16120 1068 1876
16122 1069 1876
16124 1069 1876
16126 1069 1876
16128 1070 1877
16130 1071 1877
16132 1071 1877
16134 1072 1877
<snip>
Goes negative here:
40782 1 4269
40784 1 4269
40786 0 4269
40788 1 4270
40790 2 4270
40792 2 4270
40794 3 4270
40796 -1 4270
<snip>
100000 -6911 9592
Four hits. Unless there were some more crossovers.
Where do you get your drugs from? I want.
Recursive?
As in S_n = function of S_{earlier m's}.
Wrong in any case.
ML
BTW, if you're going to have a sum of the form sum(1<=m<=m_max,2m+3
prime) S_m, I don't see what's wrong with sum(1<=m<=m_max,m prime) S_m
with m_max=n-1 and S_m=1. Got a much better hit rate, that one does.
>The recursive formula for the number of primes below an even number
>N>=18 is
>
> N/2 - S where S is the sum of S_m from 0 to m_max for m's where 2m+3
>is prime, where
For heaven's sake. Even if the current version were _right_, don't
you see you utterly ridiculous this is? A "formula" for the number
of primes that involves only counting primes is just silly.
The point being that a much simpler formula is given by S = the
sum of 1, where the sum ranges over all m < N such that m is prime.
> S_0 = int((N-4)/6), S_m = int((N-4m^2 - 7m - 4)/(4m+6)), and
>
> m_max = int(sqrt(8N-17)-7)/8.
>
>So, for m_max = 2, S = S_0 + S_1 + S_2.
>
>The first m that's dropped is m=3, since 2m+3 = 9, as it's not prime.
>
>And the number of primes is N/2 - S.
>
>Plugging in 24 for a quick test gives,
>
> m_max = 0, S_0 = 3, which gives 9 primes.
>
>
>James Harris
David C. Ullrich
>jst...@msn.com (James Harris) writes:
>
>> The recursive formula for the number of primes below an even number
>> N>=18 is
>
>[...]
>
>Amazing, simply amazing. People have posted pi(n) for quite a few
>large numbers, it would be child's work to verify something like the
>above claim for the given cases.
>
>How stupid must one be to keep spewing forth "corrections" for days
>and days on end which keep missing the true values by orders of
>magnitude, when the correct values are already given?
>
>I knew that JSH was stupid, but his current streak of idiocy is even
>surprising for his standards.
Yes it is - in fact you missed the stupdiest aspect of it. The
current version involves a sum over all m such that 2m + 3 is prime!
If we're allowed to use that kind of criterion there are simpler
formulas...
>--
>David Kastrup, Kriemhildstr. 15, 44793 Bochum
>Email: David....@t-online.de
David C. Ullrich
One of these days, I'll have a system in my computer room
that can look at all that. My definition of recursive
formula is what comes out of my mouth when I'm debugging one.
'ey, Uncle. Good to see you're getting computes done.
/BAH
Subtract a hundred and four for e-mail.
>In article <3CEEF518...@hate.spam.net>,
> Uncle Al <Uncl...@hate.spam.net> wrote:
>>James Harris wrote:
>>>
>>> The recursive formula
>>[snip]
>>
>>You don't know the meaning of "recursive." Uncle Al will help you,
>>
>>http://www.mazepath.com/uncleal/sunshine.jpg
>>Recursive, cf: recursive.
>
>One of these days, I'll have a system in my computer room
>that can look at all that.
You must know someone with a PC with a standard web
browser. Borrow it for a minute - you'll be glad you did.
>My definition of recursive
>formula is what comes out of my mouth when I'm debugging one.
>'ey, Uncle. Good to see you're getting computes done.
>
>/BAH
>
>Subtract a hundred and four for e-mail.
David C. Ullrich
> The recursive formula for the number of primes below an even number
> N>=18 is
>
> N/2 - S where S is the sum of S_m from 0 to m_max for m's where 2m+3
> is prime, where
>
> S_0 = int((N-4)/6), S_m = int((N-4m^2 - 7m - 4)/(4m+6)), and
>
> m_max = int(sqrt(8N-17)-7)/8.
Should be m_max = int((sqrt(8N-17)-7)/8) I guess.
Then you need to test numbers up to roughly sqrt(N/2) to calculate
pi(N). That's somewhat better than Legendre's Formula which relies on
primes up to sqrt(N):
http://mathworld.wolfram.com/LegendresFormula.html
But _unlike your formula_ that formula is correct, it has been explored
to give better formulas (Meissel, Lehmert) and all this is 200 years old
or so.
> So, for m_max = 2, S = S_0 + S_1 + S_2.
>
> The first m that's dropped is m=3, since 2m+3 = 9, as it's not prime.
>
> And the number of primes is N/2 - S.
>
> Plugging in 24 for a quick test gives,
>
> m_max = 0, S_0 = 3, which gives 9 primes.
That's _one_ case, it tests only N/2 - int((N-4)/6) since m_max = 0, and
the result gets wrong already at N = 26.
--
___________________________________________________________________
Bengt Månsson, Partille, Sweden http://www.algonet.se/~bengtmn/
PhD Theoretical Physics, speciality Classical Fields and Relativity
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Yup. Public libraries. Although I've noticed that other
people have "discovered" that libraries have them. Last year
I never had to wait; this year all terminals are busy.
The last time I looked at Uncle's stuff, I was just blown
away by his programmer's efficiency. That stuff just went
<whoosh!>. [emoticon shivering with delight]
>The recursive formula for the number of primes below an even number
Why keep using 24 for a test? Don't you think it would be
wise to check other modest values where your "corrected"
formulas have broken down, like N=100 or 1000?
- Randy