Re: [sage-support] Period of a sequence

2018-12-17 Thread Vincent Delecroix
Indeed, primitive_length only consider periods that are integer divisors of the total length. If you want other periods you can use the (very slow) sage: Word(S).periods() [3, 6, 9] Vincent Le 17/12/2018 à 09:52, pc.chandr...@gmail.com a écrit : Thank you. However if

Re: [sage-support] Period of a sequence

2018-12-17 Thread pc . chandra12
Thank you. However if S=[1,2,3,1,2,3,1,2,3,1,2], it is showing 11 although period is 3. On Monday, December 10, 2018 at 1:26:50 PM UTC+5:30, vdelecroix wrote: > > You can use > > sage: w = Word(S) > sage: w.primitive_length() > [3] > sage: w.primitive() > word: 123 > > Le 09/12/2018 à

Re: [sage-support] Period of a sequence

2018-12-09 Thread Vincent Delecroix
You can use sage: w = Word(S) sage: w.primitive_length() [3] sage: w.primitive() word: 123 Le 09/12/2018 à 11:57, chandra chowdhury a écrit : I have a sequence which I stored in an array. I want to find the period of the sequence. But the following code gives error. S=[1,2,3,1,2,3]

Re: [sage-support] Period of a sequence

2018-12-09 Thread Dima Pasechnik
On Sun, Dec 9, 2018 at 10:57 AM chandra chowdhury wrote: > > I have a sequence which I stored in an array. > I want to find the period of the sequence. > But the following code gives error. > > S=[1,2,3,1,2,3] > S=Sequence(S) > print S.period() What does tell you that Sequence has such a method

[sage-support] Period of a sequence

2018-12-09 Thread chandra chowdhury
I have a sequence which I stored in an array. I want to find the period of the sequence. But the following code gives error. S=[1,2,3,1,2,3] S=Sequence(S) print S.period() -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from

[sage-support] Period of a sequence

2012-01-20 Thread Santanu Sarkar
I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period? Or, can we find the period efficiently? For example {0,1,0,1,0,1} has period of length 2. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe

Re: [sage-support] Period of a sequence

2012-01-20 Thread David Joyner
On Fri, Jan 20, 2012 at 9:56 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period? Or, can we find the period efficiently? For example {0,1,0,1,0,1} has period of length 2.

Re: [sage-support] Period of a sequence

2012-01-20 Thread Santanu Sarkar
Thank you very much. On 20 January 2012 20:57, David Joyner wdjoy...@gmail.com wrote: On Fri, Jan 20, 2012 at 9:56 AM, Santanu Sarkar sarkar.santanu@gmail.com wrote: I have a sequence of 0 and 1. I know that period is small. Is there any function in Sage by which I can find the period?