mersenneforum.org Beginning questions about Aliquot Sequences
 Register FAQ Search Today's Posts Mark Forums Read

2011-08-03, 22:41   #23
RichD

Sep 2008
Kansas

BCB16 Posts

Quote:
 Originally Posted by JohnFullspeed where :Dairo's factorization applet,
Look here.

2011-08-04, 00:27   #24
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts

Quote:
 Originally Posted by JohnFullspeed I don't understand the algorithm can you explain me and if you have a faster I'm interested!!!!! where :Dairo's factorization applet, John
all the code does is calculate the sum of the divisors of the number x then minus x from the total y amount of time concatenating the last result into a vector. then displays the vectors in PARI.

2011-08-04, 00:31   #25
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by science_man_88 all the code does is calculate the sum of the divisors of the number x then minus x from the total y amount of time concatenating the last result into a vector. then displays the vectors in PARI.
my latest implementation is:
Code:
trying(x)=a=[x];until(isprime(x)||sigma(x)-x==x,if(isprime(x),break(),x=sigma(x)-x;a=concat(a,x)));a
and yes this covers primes and perfect numbers but not the wider amicable and social numbers.

2011-08-17, 06:24   #26
JohnFullspeed

May 2011
France

101000012 Posts
i' m back!!!!

I don't know PARI
Quote:
 trying(x,y)=b=1; ?????? a=[x]; ?????? until(b==y || isprime(x)||sigma(x)-x==x, if(isprime(x),break(),x=sigma(x)-x;a=concat(a,x);b=b+1)); a ????

Who are x and Y
Who are a and b
What means a=[x]?
Why sigma(x)-x==x,

a=concat(a,x) => a=a*x ?????

I understood that B begin at one and is inc is one. It's true?
You don't have prime factor ans the power: you compute directly x?

Thanhs
John

2011-08-17, 18:22   #27
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

838410 Posts

Quote:
 Originally Posted by JohnFullspeed Who are x and Y?
They are given values the function uses as inputs
Quote:
 Originally Posted by JohnFullspeed Who are a and b?
They are variables used to calculate the result of the function.

Quote:
 Originally Posted by JohnFullspeed What means a=[x]?
it turns a into a vector with x as a element of the vector.

Quote:
 Originally Posted by JohnFullspeed Why sigma(x)-x==x, ?
Because, sigma(x) = sum of all divisors including x which would not be added in an aliquot sequence as it is not proper. to get rid of the x we simply subtract it to form the new correct x value.

Quote:
 Originally Posted by JohnFullspeed a=concat(a,x) => a=a*x ?????
it means http://en.wikipedia.org/wiki/Concatenation

Last fiddled with by science_man_88 on 2011-08-17 at 18:23

 2011-08-17, 19:07 #28 JohnFullspeed   May 2011 France 7×23 Posts Pari Pour moi concat c'est pour des characteres pas des numerics et concatenet des numriques cela ne veut rien dire Mes outils sont presque prets A moi les ALIQOT John
 2011-08-20, 07:17 #29 JohnFullspeed   May 2011 France 7·23 Posts PATI Code: trying(x)=a=[x];until(isprime(x)||sigma(x)-x==x, if(isprime(x),break(), x=sigma(x)-x; a=concat(a,x))); a What I understand X is the value to factorize [x] is a vector with primes numbers for each value of the vector you verify: isprime(x)||sigma(x)-x==x if(isprime(x),break(), stop because X is prime You compute a New X x=sigma(x)-x; you cumul the result in a a=concat(a,x) and you do a mysterery: a; ?????? My questions are How do youu fill the vector? where do you div x? where are the power of P(if exist) What is wrong.... John
2011-08-20, 14:32   #30
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by JohnFullspeed Code: trying(x)=a=[x];until(isprime(x)||sigma(x)-x==x, if(isprime(x),break(), x=sigma(x)-x; a=concat(a,x))); a What I understand X is the value to factorize [x] is a vector with primes numbers for each value of the vector you verify: isprime(x)||sigma(x)-x==x if(isprime(x),break(), stop because X is prime You compute a New X x=sigma(x)-x; you cumul the result in a a=concat(a,x) and you do a mysterery: a; ?????? My questions are How do youu fill the vector? where do you div x? where are the power of P(if exist) What is wrong.... John
the bold are because X does not exist in this program it's x only. the underline is the answer to how it fills the vector. x=sigma(x)-x is all you need to calculate.

 2011-08-21, 15:49 #31 JohnFullspeed   May 2011 France A116 Posts X Sorrry the Pascal is NOT CASE SENSITIVe Prime=PRimE=PRIME=PrImE.... so for me X=x John Last fiddled with by JohnFullspeed on 2011-08-21 at 15:51
2011-08-21, 16:20   #32
CRGreathouse

Aug 2006

5,869 Posts

Quote:
 Originally Posted by JohnFullspeed Pour moi concat c'est pour des characteres pas des numerics et concatenet des numriques cela ne veut rien dire Mes outils sont presque prets
In this case it appends the second variable to the vector.

concat([1, 2, 3], 4)

gives

[1, 2, 3, 4]

2011-08-21, 16:24   #33
CRGreathouse

Aug 2006

5,869 Posts

Quote:
 Originally Posted by JohnFullspeed How do youu fill the vector?
The step

a=concat(a,x)

adds x to the end of the vector a.

Quote:
 Originally Posted by JohnFullspeed where do you div x?
I don't know what you mean.

Quote:
 Originally Posted by JohnFullspeed where are the power of P(if exist)
I don't know what you mean by this either.

 Similar Threads Thread Thread Starter Forum Replies Last Post fivemack FactorDB 45 2020-05-16 15:22 schickel FactorDB 18 2013-06-12 16:09 garambois Aliquot Sequences 34 2012-06-10 21:53 biwema Aliquot Sequences 6 2011-08-22 20:41 schickel mersennewiki 0 2008-12-30 07:07

All times are UTC. The time now is 07:11.

Wed Aug 12 07:11:46 UTC 2020 up 26 days, 2:58, 1 user, load averages: 1.78, 1.44, 1.43