Re^2: Error-finding program

Richard Mathar mathar at strw.leidenuniv.nl
Thu Oct 26 12:37:44 CEST 2006


> From seqfan-owner at ext.jussieu.fr  Wed Oct 25 21:07:37 2006
> Return-Path: <seqfan-owner at ext.jussieu.fr>
> To: seqfan at ext.jussieu.fr
> Subject: Re: Error-finding program
> Date: Wed, 25 Oct 2006 15:05:48 -0400
> ...
> 
> A026127 Should certainly be monotonic; I don't know what the correct
> value of a(19) is.

The definition of A026127 should be
a(n)=T(2n-1,n-1)
and have an offset of 1, since a(n) collects
A026120(1,0),
A026120(3,1),
A026120(5,2),...
[Note that A026120(i,j) has an offset of -1 with both the i and the j index].

So I'd guess that two leading digits are missing in a(18)--called a(19) above:


1 1
2 4
3 20
4 110
5 608
6 3409
7 19304
8 110187
9 632960
10 3654915
11 21195716
12 123365099
13 720240584
14 4216176575
15 24738092400
16 145444454754
17 856662911136
18 5053815390148
19 29857490333880
20 176624209891024

And this is the experimentation with PARI (a lot of fiddling around with
other messy definitions in the auxiliary sequences...)

/* slooooow but correct
A026300(n,k)={
	if(n<0 || k < 0,
		return(0) ;
	) ;
	if(n<=1,
		1,
		if(k==0,
			1,
			if(k<n,
				A026300(n-1,k-2)+A026300(n-1,k-1)+A026300(n-1,k),
				A026300(n-1,n-2)+A026300(n-1,n-1)
			) ;
		) ;
	) ;
}
*/
A026300(n,k)={
	if(n<0 || k < 0,
		return(0) ;
	) ;
	if(n<=1,
		1,
		if(k==0,
			1,
			sum(i=0,k/2,
				binomial(n,2*i+n-k)*(binomial(2*i+n-k,i)-binomial(2*i+n-k,i-1))
			) ;
		) ;
	) ;
}

A026105(n,k)={
	if(k==0 || n<=1,
		1,
		A026300(n,k)-A026300(n-1,k-1) ;
	) ;
}

A026120(n,k)={
	if(n<=1,
		if(k== -1 || k < n,
			1,
			0
		),
		A026105(n+1,k+1)-A026105(n,k) ;
	) ;
}

A026127(n)={
	A026120(2*n-1,n-1) ;
}

{
	/* test
	for(i=0,7,
		for(j=0,i,
			print(A026300(i,j))
		) ;
		print(";") ;
	) ;
	*/

	/* test
	for(i=-1,7,
		for(j=-1,i,
			print(A026120(i,j))
		) ;
		print(";") ;
	) ;
	*/
	for(n=1,20,
		print(n," ",A026127(n))
	) ;
}






More information about the SeqFan mailing list