[seqfan] Re: useful complifification in A130102?

Richard Mathar mathar at strw.leidenuniv.nl
Sun Feb 14 23:26:33 CET 2010


R^2 asked:

> in http://www.research.att.com/~njas/sequences/A130102
> we learn:
> 
> a(n)=2^n-2n+2*C(2, n)-4*C(1, n)+2*C(0, n); 
> 
> The essence of that is:
> 
>       a(2) = 2,   a(n) = 2^n - 2n  for n /= 2
> ..
> Is there any value in having such a complicated expression here?

I have occasionally seen this in coding that was tailored to
vectorizing compilers that may choke if they find an if-then-else
construct inside an otherwise friendly (for parallelization) assignment
loop. Besides A130102, it is used a lot in the barryonic submissions.

RJM




More information about the SeqFan mailing list