Bill Allombert on Thu, 15 Jan 2026 15:27:12 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Questions on alternative set notations


On Thu, Jan 15, 2026 at 12:49:07AM +0100, hermann@stamm-wilbrandt.de wrote:
> Alternative set notations are documented here:
> https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.17.2/users.pdf#page=25
> 
> As an example I am interested in Euler polynomial values
> 
> ? [k^2+k+41|k<-[0..11]]
> [41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173]
> ?
> 
> that belong to Mod(1,4).
> 
> 
> Which of the following is preferable?
> (1+2 filter, so 50% of the values; 3 results in 100% of initial set values)
> 
> ? [k^2+k+41|k<-[0..11],(k%4)%3==0]
> [41, 53, 61, 97, 113, 173]

Surely this one is the more natural ?

> Is there a more natural alternative to sequence assignment workaround
> "...;k<-[f(l)]..." that works in alternative sets?

No, sorry!

Cheers,
Bill.