login
A387959
Least positive integer m such that the n numbers (prime(1)-1)^2,...,(prime(n)-1)^2 are pairwise incongruent modulo m.
1
1, 2, 7, 9, 13, 17, 19, 23, 25, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
OFFSET
1,2
COMMENTS
Clearly, a(n) <= a(n+1). Also, a(n) is not equal to prime(n) since (prime(n)-1)^2 == (prime(1)-1)^2 (mod prime(n)). Note that a(n) <= prime(n+1) since m = prime(n+1) does not divide (prime(k)-1)^2 - (prime(j)-1)^2 = (prime(k) - prime(j))*(prime(k) + prime(j) - 2) for any 1 <= j < k <= n.
Conjecture: a(n) = prime(n+1) except for n = 1, 2, 4, 9.
This has been verified for n <= 55000. The conjectural recurrence for primes is equivalent to the conjecture in A387947, but different from the conjecture in A181901.
The current sequence differs from A181901 at the second term.
The conjecture has been verified for n <= 10^6 by Nie Chen at the First Middle School of Nanjing via C++. - Zhi-Wei Sun, Oct 20 2025
Jiao-Min Lin, a former student of Nanjing University, has verified the conjecture for n <= 10^7. - Zhi-Wei Sun, Oct 23 2025
LINKS
Zhi-Wei Sun, On functions taking only prime values, J. Number Theory 133 (2013), no. 8, 2794-2812.
Zhi-Wei Sun, A mysterious recurrence for primes, Question 501545 at MathOverflow, Oct. 13, 2025.
EXAMPLE
a(4) = 9 since (prime(1)-1)^2 = 1, (prime(2)-1)^2 = 4, (prime(3)-1)^2 = 16 and (prime(4)-1)^2 = 36 are pairwise incongruent modulo 9, but 36 == 4 (mod 2^3), 16 == 1 (mod 3*5), 16 == 4 (mod 6) and 36 == 1 (mod 5*7).
MATHEMATICA
f[n_]:=f[n]=(Prime[n]-1)^2;
tab={}; m=1; Do[Label[bb]; If[Length[Union[Table[Mod[f[k], m], {k, 1, n}]]]==n, tab=Append[tab, m]; Goto[aa]]; m=m+1; Goto[bb];
Label[aa], {n, 1, 60}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 12 2025
STATUS
approved