Re: My prime counting function



On Aug 5, 3:14 am, bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
JSH wrote:
On Aug 4, 4:06 am, bugbear <bugbear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
JSH wrote:
Sieve form of my prime counting function:
With natural numbers x and n, where p_i is the i_th prime:
P(x,n) = x - 1 - sum for i=1 to n of {P([x/p_i],i-1) - (i-1)}
where if n is greater than the count of primes up to and including
sqrt(x) then n is reset to that count.
That simple algorithm will count primes out to positive infinity.  And
yes, it is perfect.
But sadly, not in Java.

   BugBear

I have programs in Java implementing the algorithm.  I posted them
years ago so I can just do searches to post them here but I don't
think that would help much.

I'm sorry - in that case, what is your purpose in posting
here?

I'm rather confused.

   BugBear

Good question.

Originally I was curious to see if I could get some info about use of
my Class Viewer program, where that post dropped like a stone, which
might have been it.

But then, out of the blue I had this idea for this algorithm for
tackling the Traveling Salesman Problem, and posted it here. Why
here? Well years of experience on certain other newsgroups meant I
KNEW up front that it wouldn't go well on them, and hey, here I might
get some people interested in coding the thing as in the back of my
mind was coding this approach and trying to get help as I went the
single developer route with Class Viewer and wonder now if that was
the best way.

I got some good feedback about my TSP algorithm, but also got (and
gave) some abuse including some person linking to that hate page
against me on crank.net, and then I just dropped out of that
discussion completely as I've been down that flame war road and don't
like it.

And THAT might have been it, but as I kept pondering my latest ideas
and thinking about my old ones it bugged me again how easily knowledge
is REALLY held back in the real world versus the fantasy of eureka and
people cheering you own, so I found myself talking about my prime
counting function--6 years old people--maybe really out of a need to
just talk with SOMEONE, ANYONE about this nightmare but also out of a
sense of faith?

And then I had this epiphany: mathematicians tell the lie that even a
janitor could get recognized for a major math result, but hey, that
has big class consequences and it's clearly a social lie, so I came up
with the analogy of developers out there going to work and finding the
janitor they saw working at cleaning the day before is now the lead
developer on their project, and is ready to give them coding advice.
And that epiphany put it all in perspective.

And then it was all clear and sitting here this morning I actually
feel a lot better.

Mathematicians may be liars about the janitor thing but who among us
really is not class conscious? Who among us really would just accept
merit rather than rely on social structures that help ensure our own
social positions against sudden upheaval?

If math people really would accept anyone who came up with a major
math result then they could go to bed with one class position and
status relative to just about anyone and wake up with another.

No human groups accept that. None.


James Harris
.



Relevant Pages

  • Re: TRICK: methods in ASPX pages with <%%> code blocks
    ... developer, adopt best practices. ... experiences, and by observing the experiences of others, over a long period ... >I don't have solid "evidence" of coding one way or the other. ... but your reasons for not doing just don't make sense to me. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Whats up with "whidbey" & "orcas"
    ... Anyone who claims to be able to architect anything, ... Orcas, by any other name, smells like CASE. ... developer who sometimes does independent work, ... > I think orcas will reduce 100% coding. ...
    (microsoft.public.vsnet.general)
  • Re: CAD Drawing
    ... For the math part, I think I'm ok. ... For the coding part such as coordinates ... system, grid lines/points zoom in and out function, I'm stuck. ... > normal GUI graphics. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Whats on your test bench?
    ... "> Octave is a great language for quickly coding up the math of ...
    (sci.electronics.design)
  • Re: how many bugs do you find and correct during TDD?
    ... I use metrics and other developer ... >> techniques to identify defects before and during coding. ... as a developer then your probably not doing the things you need to be. ...
    (comp.object)