[seqfan] Re: useful complifification in A130102?
Rainer Rosenthal
r.rosenthal at web.de
Mon Feb 15 01:12:50 CET 2010
Richard Mathar schrieb:
> 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.
Sorry, I don't know what "barryonic" means. ... Oh ... well ... it
refers to the submitter, Paul Barry. ( Punny reference to 'baryonic'.)
Well, I came across A130120 because it resembles
A005803 Second-order Eulerian numbers: 2^n - 2n.
I thought it might be worthwhile to make the resemblance more apparent.
Both sequences are identical except for index n=2.
Isn't there any nicer characteristic function around, which takes on
value 2 for n=2 and value 0 for all other n (and which doesn't paralyse
parallyzers(*))?
Cheers,
Rainer
(*) trying to re-pun.
More information about the SeqFan
mailing list