0
liste(lim,mul,base=34,step=5590,offset=588)=my(v=List(),X=mul*base); lim\=1; while(X<lim,forstep(n=X+offset+step,lim,step, listput(v,n)); X*=base); Set(v)
list(lim)=setunion(liste(lim,23),liste(lim,223))
v=list(1e6)

This is a Pari code.

Now how can I modify this program to see if it is true that if numbers generated with that Pari code are multiple of 43, then they are congruent either to 0 or 344 mod (559)?

Piotr Semenov
  • 1,761
  • 16
  • 24

1 Answers1

1

You can use select function:

subset1 = select((x) -> (x % 43 == 0), v);
subset2 = select((x) -> (x % 43 == 0) && (x % 559 == 0 || x % 559 == 344), v);
vecsort(subset1) == vecsort(subset2)
> 1

So the conjecture works for numbers generated by your PARI/GP code.

Piotr Semenov
  • 1,761
  • 16
  • 24
  • Maybe the https://mathoverflow.net/ is the option. If you are ok with answer, please kindly accept it. – Piotr Semenov Apr 04 '20 at 22:52
  • Your conjecture is just wrong (even apart from this is a programming site - not math). Clearly 86 is a multiple of 43, but is not congruent to either 0 or 344 mod 559. The program is testing the opposite (if a number is congruent to 0 or 344 mod 559 then it is a multiple of 43). This is because 559 and 344 are multiples of 43 - basic arithmetic and definition of modulo. – Andrew May 26 '20 at 16:40