Ask Your Question

Jose Arnaldo Bebita Dris's profile - activity

2023-07-24 19:56:06 +0200 received badge  Popular Question (source)
2023-07-23 15:23:03 +0200 received badge  Popular Question (source)
2023-01-18 14:48:00 +0200 received badge  Autobiographer
2020-09-10 11:25:21 +0200 received badge  Self-Learner (source)
2020-09-10 01:15:09 +0200 answered a question I cannot seem to figure out what's wrong with the following Sage / Pari-GP code

Got it! There was indeed a missing asterisk, after all!

The Pari-GP script should have been coded as such:

for(x=1, 100000, for(y=1, 100000, if(2*x*y-sigma(x*y) >= (2*x-sigma(x))*(sigma(y)-y),print(x,"   ",y))))

I am able to run this version of the script now.

2020-09-10 01:11:31 +0200 asked a question I cannot seem to figure out what's wrong with the following Sage / Pari-GP code

Basically, I would like to search for counterexamples to my conjecture that $$(2xy - \sigma(xy)) < (2x - \sigma(x))(\sigma(y) - y)$$ where $\sigma$ is the sum of divisors.

I tried using the following Pari-GP script in Sage Cell Server:

for(x=1, 100000, for(y=1, 100000, if(2*x*y-sigma(x*y) >= (2x-sigma(x))*(sigma(y)-y),print(x,"   ",y))))

However, it is returning the following error message:

***   syntax error, unexpected ')', expecting )-> or ',': 
  ***   ...-sigma(x*y)>=(2x-sigma(x))*(sigma(y)-y),print(
  ***                               ^---------------------

I did already check and verified that all the parentheses are in their proper places. I also checked for missing asterisks and verified that there are none.

2020-07-12 02:42:21 +0200 received badge  Student (source)
2020-07-12 02:42:17 +0200 received badge  Self-Learner (source)
2020-07-09 15:44:06 +0200 commented answer I cannot seem to figure out what's wrong with the following Sage / Pari-GP code

Thank you for your answer. I was able to figure it out as you were about to post your answer.

2020-07-09 15:43:29 +0200 received badge  Supporter (source)
2020-07-09 15:42:37 +0200 answered a question I cannot seem to figure out what's wrong with the following Sage / Pari-GP code

Blimey! I was able to figure it out.

for(p=1, 10000, for(y=1, 10000, for(z=1, 10000, if(y < z && 1 + p^y < 2*p^(2*y-z) && isprime(p),print(p,"   ",y,"   ",z)))))

It is a common mistake of mine. I keep forgetting the * to indicate multiplication.

2020-07-09 15:13:09 +0200 asked a question I cannot seem to figure out what's wrong with the following Sage / Pari-GP code

Basically, I would like to search for primes $p$, and positive integers $y, z$ satisfying $$y < z$$ and $$1 + p^y < 2p^{2y-z}.$$

for(p=1, 10000, for(y=1, 10000, for(z=1, 10000, if(isprime(p) && y<z && 1+p^y<2p^(2y-z),print(p,"   ",y,"   ",z)))))

When I try to compile the above code using Sage Cell Server, it gives me the following error:

***   syntax error, unexpected ')': ...int(p," ",y," ",z)))))

* ^- Help | Powered by SageMath

I did already check and verified that all the parentheses are in their proper places.

Please help!

2020-04-04 22:45:34 +0200 received badge  Teacher (source)
2020-04-04 22:45:34 +0200 received badge  Self-Learner (source)
2020-04-04 16:25:13 +0200 answered a question Problem with simple Pari/GP script in Sage Cell Server

Blimey! I figured it out.

Pari/GP script should have been:

for(x=1, 1000000, for(y=1, 1000000, if(floor((sigma(x)/y)+(sigma(y)/x))==2*x-sigma(x),print(x,"   ",y))))

(the original had 2x instead of 2*x).

2020-04-04 16:25:13 +0200 asked a question Problem with simple Pari/GP script in Sage Cell Server

I am trying to run the following Pari/GP script in Sage Cell Server:

for(x=1, 1000000, for(y=1, 1000000, if(floor((sigma(x)/y)+(sigma(y)/x))==2x-sigma(x),print(x,"   ",y))))

I cannot seem to figure out what is wrong with it.

I confirm that I am choosing the correct option in the drop-down menu (i.e., GP).

I am getting the following error message:

***   expected character: ',' or ')' instead of: ...ma(x)/y)+(sigma(y)/x))==2
  ***   x-sigma(x),print(x,"