Discussion
Mon Oct 16
04:37
Michel Marcus: I think the lift in pari is not necessary
04:39
David A. Corneth: not really. Maybe it eases memory? not sure. Anyway, do I change the file?
21:28
Albert Mukovskiy: Dear David A. Corneth,
Lift operation is not necessary here, but it does not slow down the performance. May be it may stay for clarity. I just used the code from A121278 page as a template. Anyway, Michel Marcus's code works better here.
You wrote: > a(n) = n if there are more than n/2 distinct integers x^n mod n.
You may say simply: a(n) = n, whenever A195637(n)>n/2.
Wed Oct 18
17:23
David A. Corneth: Yes Albert, Michels code is fine too. Your "a(n) = n, whenever A195637(n)>n/2." is shorter than my statement but needs a look up for A195637. Therefore I like putting it without using that sequence.
17:35
Albert Mukovskiy: Ok, since A195637 is in Crossref anyway.
COMMENTS
a(n) = n if there are more than n/2 distinct integers x^n mod n. - David A. Corneth, Oct 16 2023
LINKS
David A. Corneth, <a href="/A366418/a366418.gp.txt">TITLE FOR LINKPARI program</a>
LINKS
David A. Corneth, <a href="/A366418/a366418.gp.txt">TITLE FOR LINK</a>
NAME
Number of distinct integers of the form (x^n + y^n () mod n).
Discussion
Fri Oct 13
19:57
Albert Mukovskiy: I edited the title. Is it Ok?
Discussion
Thu Oct 12
16:30
David A. Corneth: If the size of set of residues mod n is over n/2 then a(n) = n by the pigeonhole principe right?
17:38
Albert Mukovskiy: When n is prime, the number of distinct residues of k^n (mod n) is n>n/2 (and also it is n in some other cases: A195637). When n=2p (p is odd prime), then this number is p+1>n/2.
Fri Oct 13
02:19
David A. Corneth: Great! that eases computation quite a bit
17:32
Max Alekseyev: "mod" should be binary operation in the title, not congruence/residue's one.
NAME
Number of distinct integers of the form x^n + y^n (mod n), x,y=0..n-1.
Discussion
Thu Oct 12
13:09
Albert Mukovskiy: Ok, ", x,y=0..n-1" is removed.