[seqfan] Re: Fwd: Re: A000207: Maple-Program wrong

Maximilian Hasler maximilian.hasler at gmail.com
Sun Apr 19 23:45:44 CEST 2009


> the Maple program was wrong, I simply meant that it didn't work
> when simply cut and pasted.

This is probably due to the problem I labelled (*) : obsolete "RETURN".

>> A000207 := proc(n) local k, it1, it2; ...

Don't use this (wrong offset) but rather

A000207 := proc(n) local t;
 if n mod 2 = 0 then t := A000108(n/2)/4 else t := 0 fi:
 if n mod 3 = 1 then t := t + A000108((n-1)/3)/3 fi:
 A000108(n)/(2*n+4) + t + A000108(floor(n/2))/2
end:

or
A000207 := n ->  A000108(n)/(2*n+4) + A000108(floor(n/2))/2
 + eval( piecewise( n mod 2 = 0, 'A000108(n/2)/4' )
 + piecewise( n mod 3 = 1, 'A000108((n-1)/3)/3' ));

where the eval( ... '...' ) is used to avoid useless evaluation of the
respective expressions.

> This one works perfectly and agrees with the sequence.

Yes. ;-)

> Do you think it would be an interesting comment that
>
>            lim{n->oo} A000207(n+1)/A000207(n) = 4
>
> or is this an immediate consequence for the learned reader of the fact
> that the g.f. produces real values for -1/2 <= x <= 1/4?

I'd say this is rather a consequence from

A000108(n) ~ 4^n / (sqrt(Pi * n) * (n + 1))

and

A000207(n) ~ A000108(n)/(2*n+4)

Maximilian




More information about the SeqFan mailing list