[seqfan] Re: Wavy Simple Recursion Involving Minimum

Leroy Quet q1qq2qqq3qqqq at yahoo.com
Thu Jul 30 15:57:49 CEST 2009


Actually, I did not make a mistake. You forgot that the top line of a signed sequence is the absolute values of the terms.

Neil: Is giving the absolute value of a signed sequence in the reply confusing people? I don't understand the utility of having the absolute value sequence in the first place.

Thanks,
Leroy Quet


[ ( [ ([( [ ( ([[o0Oo0Ooo0Oo(0)oO0ooO0oO0o]]) ) ] )]) ] ) ]


--- On Wed, 7/29/09, Joerg Arndt <arndt at jjj.de> wrote:

> From: Joerg Arndt <arndt at jjj.de>
> Subject: [seqfan] Re: Wavy Simple Recursion Involving Minimum
> To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
> Date: Wednesday, July 29, 2009, 11:55 PM
> N=40; A=vector(N);
> \\ a(0)=0, a(1)=1, a(2)=2. For n>=3, a(n) = a(n-1) -
> min(a(n-2),a(n-3))
> A[1]=0; A[2]=1; A[3]=2;  \\ note arrays start with
> index 1 in pari/gp
> for(n=4, N, A[n] = A[n-1] - min(A[n-2],A[n-3]) );
> 
> V=[0,1,2,2,1,1,2,1,1,3,4,3,0,3,3,0,3,6,6,3,
> 0,1,2,2,1,-1,-2,-1,1,3,4,3,0,-3,-3,0,3,6,6,3]
> A
> V-A
> 
> 
> V is what you submitted and that appears to be WRONG:
> 
> ?
> V=[0,1,2,2,1,1,2,1,1,3,4,3,0,3,3,0,3,6,6,3,0,1,2,2,1,-1,-2,-1,1,3,4,3,0,-3,-3,0,3,6,6,3]
> ? A
> [0, 1, 2, 2, 1, -1, -2, -1, 1, 3, 4, 3, 0, -3, -3, 0, 3, 6,
> 6, 3, -3, -6, -3, 3, 9, 12, 9, 0, -9, -9, 0, 9, 18, 18, 9,
> -9, -18, -9, 9, 27]
> ? V-A
> [0, 0, 0, 0, 0, 2, 4, 2, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0,
> 0, 3, 7, 5, -1, -8, -13, -11, -1, 10, 12, 4, -6, -18, -21,
> -12, 9, 21, 15, -3, -24]
> 
> 
> ...also more terms should be included:
> 
> 0, 1, 2, 2, 1, -1, -2, -1, 1, 3, 4, 3, 0, -3, -3, 0, 3, 6,
> 6, 3, -3,
> -6, -3, 3, 9, 12, 9, 0, -9, -9, 0, 9, 18, 18, 9, -9, -18,
> -9, 9, 27,
> 36, 27, 0, -27, -27, 0, 27, 54, 54, 27, -27, -54, -27, 27,
> 81, 108,
> 81, 0, -81, -81, 0, 81, 162, 162, 81, -81, -162, -81, 81,
> 243, 324,
> 243, 0, -243, -243, 0, 243, 486, 486, 243, -243, -486,
> -243, 243, 729,
> 972, 729, 0, -729, -729, 0, 729, 1458, 1458, 729, -729,
> -1458, -729,
> 729, 2187
> 
> This did cost me less than 3 minutes.
> 
> If you are not willing to invest this time for your seqs
> they are definitely not worth being submitted alltogether.
> 
> 
> 
> _______________________________________________
> 
> Seqfan Mailing list - http://list.seqfan.eu/
> 


      




More information about the SeqFan mailing list