[seqfan] Re: Gauss bracket vs Iverson bracket (was: A024812).

Marc LeBrun mlb at well.com
Fri Mar 22 04:44:19 CET 2013


>="Peter Luschny" <peter.luschny at gmail.com>
> Iverson (and Knuth) suggest the following meaning:
>    [b] = 1 if the b is true and 0 otherwise.

Um, I'm pretty sure that Knuth has advocated ROUND parens (b) for that?

Also IIRC Knuth seems to like some squarish notation [x^n] f(x) for the
coefficient of x^n in the powerseries expansion of f(x)?  Me I say "bleagh".

The round thing seems OK to me I guess; it even mimics the frequent pattern
of appending side-bar conditions like ...(n>1) at the ends of long formulas.

On the other hand, there's also kind of a notational tension between using
[k] versus _k for subscripting and I'm not sure what's good.

See for example my old somewhat half-hearted (or half-assed?) proposal for a
"rebasing" notation, where 2[n](10) means "substitute the powers of 10 for
the  powers of 2 in the binary expansion of n", by analogy with F[n](x)
where "F" refers to some family of polynomials, of which we select the n-th,
as though it were an array subscript, generalizing to [j,k] and so on.

But then perhaps (as Franklin, Neil and others have suggested) _n is better.

Anyway, maybe for Boolean-->integer casting some sharper notational
distinction might be better, for example using double parens ((b))?

On the other hand, programming languages du jour have made quite an
incoherent hash of all this--see for example PHP, JavaScript etc....

The OEIS could certainly adopt a "house convention", but I'd counsel care.

--MLB





More information about the SeqFan mailing list