Velocity Reviews > Java > do u know ramanujan numbers algorithm

# do u know ramanujan numbers algorithm

emre esirik(hacettepe com. sci. and eng.)
Guest
Posts: n/a

 02-27-2008
I think about ramanujan numbers and I need to know is there any

rossum
Guest
Posts: n/a

 02-27-2008
On Wed, 27 Feb 2008 06:45:24 -0800 (PST), "emre esirik(hacettepe com.
sci. and eng.)" <(E-Mail Removed)> wrote:

>I think about ramanujan numbers and I need to know is there any

Assuming this is 1729 and friends, then there are a lot of links at:
http://mathworld.wolfram.com/TaxicabNumber.html

rossum

Sanny
Guest
Posts: n/a

 02-27-2008
On Feb 27, 7:45*pm, "emre esirik(hacettepe com. sci. and eng.)"
<(E-Mail Removed)> wrote:
> I think about ramanujan numbers and I need to know is there any

Make 4 for loops with int a,b,c,d

Check a^2+v^2=c^2+d^2

Whichever number follows print them you will find many such numbers.

Lew
Guest
Posts: n/a

 02-27-2008
Sanny wrote:
> On Feb 27, 7:45 pm, "emre esirik(hacettepe com. sci. and eng.)"
> <(E-Mail Removed)> wrote:
>> I think about ramanujan numbers and I need to know is there any

>
> Make 4 for loops with int a,b,c,d
>
> Check a^2+v^2=c^2+d^2
>
> Whichever number follows print them you will find many such numbers.

Shouldn't that calculation involve cubes rather than squares?

Doesn't the definition of "taxicab" numbers require that the number equal the
sums of two /different/ pairs of cubes?

Assuming you only want factors between 1 and 100, the suggested algorithm
requires 10^8 iterations. At, say, 100 clock cycles per iteration, that's
about 10^10 clocks, or 50 seconds on a 2GHz CPU. For a maximum root of 1000
it would take 10^12 iterations or 500,000 seconds, almost six days.

It would grow as to the fourth power of the maximum root, a rather big big O,
wouldn't you say?

To the OP: What exactly do you mean by "solving ramanujan [sic] numbers"? Do
you mean finding them? Factoring them? What?

--
Lew

Sanny
Guest
Posts: n/a

 02-27-2008
On Feb 27, 10:13*pm, Lew <(E-Mail Removed)> wrote:
> Sanny wrote:
> > On Feb 27, 7:45 pm, "emre esirik(hacettepe com. sci. and eng.)"
> > <(E-Mail Removed)> wrote:
> >> I think about ramanujan numbers and I need to know is there any

>
> > Make 4 for loops with int a,b,c,d

>
> > Check a^2+v^2=c^2+d^2

>
> > Whichever number follows print them you will find many such numbers.

>
> Shouldn't that calculation involve cubes rather than squares?
>
> Doesn't the definition of "taxicab" numbers require that the number equal the
> sums of two /different/ pairs of cubes?
>
> Assuming you only want factors between 1 and 100, the suggested algorithm
> requires 10^8 iterations. *At, say, 100 clock cycles per iteration, that's
> about 10^10 clocks, or 50 seconds on a 2GHz CPU. *For a maximum root of 1000
> it would take 10^12 iterations or 500,000 seconds, almost six days.
>
> It would grow as to the fourth power of the maximum root, a rather big big O,
> wouldn't you say?
>
> To the OP: *What exactly do you mean by "solving ramanujan [sic] numbers"? *Do
> you mean finding them? *Factoring them? *What?
>
> --
> Lew

Yes Ramanujm numbers are those numbers which follow this rul

a^3+b^3 =c^3+d^3=a Number

Then the Number is Called Ramanujm Number.

Just follow 4 for loops And test a^3+b^3 =c^3+d^3=a Number And print
those number.

Lew
Guest
Posts: n/a

 02-27-2008
"emre esirik(hacettepe com. sci. and eng.)" wrote:
>>>> I think about ramanujan numbers and I need to know is there any

Sanny wrote:
>>> Make 4 for loops with int a,b,c,d
>>> Check a^2+v^2=c^2+d^2
>>> Whichever number follows print them you will find many such numbers.

Lew wrote:
>> Shouldn't that calculation involve cubes rather than squares?

Sanny wrote:
> Yes Ramanujm numbers are those numbers which follow this rul
>
> a^3+b^3 =c^3+d^3=a Number
>
> Then the Number is Called Ramanujm Number.

Lew wrote:
>> Doesn't the definition of "taxicab" numbers require that the number equal the
>> sums of two /different/ pairs of cubes?

Shouldn't that be addressed in the algorithm also?

Sanny wrote:
> Just follow 4 for loops And test a^3+b^3 =c^3+d^3=a Number And print
> those number.

What about the O(n^4) algorithmic inefficiency of that approach? Isn't there
a better way?

Lew wrote:
>> Assuming you only want factors between 1 and 100, the suggested algorithm
>> requires 10^8 iterations. At, say, 100 clock cycles per iteration, that's
>> about 10^10 clocks, or 50 seconds on a 2GHz CPU. For a maximum root of 1000
>> it would take 10^12 iterations or 500,000 seconds, almost six days.
>>
>> It would grow as to the fourth power of the maximum root, a rather big big O,
>> wouldn't you say?

Until the issues of duplicate results and algorithmic inefficiency are

This all still leaves open the question of what the OP wants:

>> To the OP: What exactly do you mean by "solving ramanujan [sic] numbers"? Do
>> you mean finding them? Factoring them? What?

--
Lew

Sanny
Guest
Posts: n/a

 02-27-2008
On Feb 27, 10:57*pm, Lew <(E-Mail Removed)> wrote:
> "emre esirik(hacettepe com. sci. and eng.)" wrote:
>
>
>
>
>
> >>>> I think about ramanujan numbers and I need to know is there any

> Sanny wrote:
> >>> Make 4 for loops with int a,b,c,d
> >>> Check a^2+v^2=c^2+d^2
> >>> Whichever number follows print them you will find many such numbers.

> Lew wrote:
> >> Shouldn't that calculation involve cubes rather than squares?

> Sanny wrote:
> > Yes Ramanujm numbers are those numbers which follow this rul

>
> > a^3+b^3 =c^3+d^3=a Number

>
> > Then the Number is Called Ramanujm Number.

> Lew wrote:
> >> Doesn't the definition of "taxicab" numbers require that the number equal the
> >> sums of two /different/ pairs of cubes?

>
> Shouldn't that be addressed in the algorithm also?
>
> Sanny wrote:
> > Just follow 4 for loops And test a^3+b^3 =c^3+d^3=a Number And print
> > those number.

>
> What about the O(n^4) algorithmic inefficiency of that approach? *Isn't there
> a better way?
>
> Lew wrote:
> >> Assuming you only want factors between 1 and 100, the suggested algorithm
> >> requires 10^8 iterations. *At, say, 100 clock cycles per iteration, that's
> >> about 10^10 clocks, or 50 seconds on a 2GHz CPU. *For a maximum root of 1000
> >> it would take 10^12 iterations or 500,000 seconds, almost six days.

>
> >> It would grow as to the fourth power of the maximum root, a rather big big O,
> >> wouldn't you say?

>
> Until the issues of duplicate results and algorithmic inefficiency are
> addressed, I'd advise the OP to be skeptical of this approach.
>
> This all still leaves open the question of what the OP wants:
>
> >> To the OP: *What exactly do you mean by "solving ramanujan [sic] numbers"? *Do
> >> you mean finding them? *Factoring them? *What?

>
> --
> Lew- Hide quoted text -
>
> - Show quoted text -

I have O(n^2) algorithm in mind i will tell it if he really need it. I
will take \$200 for this solution.

But only if He is really in need of this algorithm.

Bye
Sanny

Eric Sosman
Guest
Posts: n/a

 02-27-2008
Sanny wrote:
> [...]
> I have O(n^2) algorithm in mind i will tell it if he really need it. I
> will take \$200 for this solution.
>
> But only if He is really in need of this algorithm.

He must be: He's multi-posted his question to half
of Usenet. (For suitable values of "half.")

--
http://www.velocityreviews.com/forums/(E-Mail Removed)

Lew
Guest
Posts: n/a

 02-27-2008
>> What about the O(n4) algorithmic inefficiency of that approach? Isn't there
>> a better way?

Sanny wrote:
> I have O(n^2) algorithm in mind i will tell it if he really need it. I
> will take \$200 for this solution.

Oh, my!

So is it fair to say that providing a bad algorithm was merely a way of
marketing the for-pay solution? "Here's a bad answer, and if you pay me I'll

I would advise anyone who thinks of taking a poster up on such an offer to
review said poster's other posts to see if it is credible that their offer is
worth the suggested cost, speaking, of course, in the most general terms and
not about any one particular such (at best) dubious offer.

Seriously, Sanny, oh, my!

--
Lew

Sanny
Guest
Posts: n/a

 02-28-2008
I will have to invest my time in generating the O(n^2) algorithm. For
O(n^4) algorithm I gave it by withing in 10 seconds for free.

Its true I can give little work for free but to design something that

If you are ill you go to docter he may give a free advice. But incase
he need to do an Xray/ Or other diagnostic Tests then the cost
increases.

Simmilarly I can devote max 2-3 min for a O(n^2) Solution but if I
have to invest 2-3 hours then I atleast ask for \$200. I generally take
\$50-\$100 / hr for Coding work. So \$200 is reasionable. And I think the
Guy is rich enough to pay me that much.

Bye
Sanny