login
A331546
a(n) = |{k^(k+1)+(k+1)^k (mod prime(n)): k = 0..prime(n)-1}|.
1
1, 3, 5, 6, 7, 9, 11, 15, 15, 17, 19, 24, 25, 28, 28, 34, 39, 38, 41, 50, 43, 48, 55, 56, 60, 62, 70, 68, 70, 76, 76, 83, 83, 78, 88, 106, 95, 98, 105, 110, 117, 106, 114, 126, 114, 129, 138, 139, 143, 148, 146, 141, 152, 159, 164, 160, 170, 171, 176, 182, 184, 191, 192, 190, 193, 194, 216, 215, 215, 217
OFFSET
1,2
COMMENTS
Conjecture: |{k^(k+1)+(k+1)^k (mod p): k = 0..p-1}| = (1-1/e)*p + O(p^(1/2)), where p denotes a prime.
LINKS
Zhi-Wei Sun, Is it true that |{k^(k+1)+(k+1)^k (mod p): k = 0..p-1}| = (1-e^(-1))*p + O(sqrt(p))? Question 350784 at MathOverflow, Jan. 20, 2020.
EXAMPLE
a(2) = 3 since {0^1+1^0, 1^2+2^1, 2^3+3^2} = {1, 3, 17} is a complete system of residues modulo the second prime 3.
MAPLE
f:= proc(p) local S, k;
nops({seq(k &^ (k+1) + (k+1) &^ k mod p, k=0..p-1)})
end proc:
seq(f(ithprime(i)), i=1..100); # Robert Israel, Jan 22 2020
MATHEMATICA
p[n_]:=p[n]=Prime[n];
a[n_]:=a[n]=Length[Union[Table[Mod[PowerMod[k, k+1, p[n]]+PowerMod[k+1, k, p[n]], p[n]], {k, 0, p[n]-1}]]];
Table[a[n], {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 19 2020
STATUS
approved