

A340281


a(n) is the smallest prime p such that the number of distinct values of the ratio (number of nonnegative m < p such that m^k == m (mod p))/(number of nonnegative m < p such that m^k == m (mod p)) is equal to n for some nonnegative k.


2



2, 3, 7, 19, 31, 163, 127, 1459, 211, 883, 811, 472393, 631, 8503057, 32077, 4051, 2311, 86093443, 4951, 6347497291777, 10531, 36451, 1299079, 251048476873, 8191, 388963, 5314411, 22051, 51031, 596046447753906250001, 28351, 411782264189299, 24571, 5904901
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

a(n) is the least prime p such that there are n distinct terms in the pth row of A334006.
Conjecture: a(n) is the smallest prime p such that the number of distinct values of the ratio T(p, k) = (number of nonnegative m < p such that m^k == m (mod p))/(number of nonnegative m < p such that m^k == m (mod p)) is equal to n for some 0 <= k <= floor((p + 2)/3).
Proof: for k > 1, iff t is a kth power residue mod p, the number of nonnegative m < p such that m^k == t (mod p) is gcd(k, p  1). Thus, the ratio T(p, 1+x) = T(p, 1+gcd(x, p1)) and T(p, 2*t) = T(p, (p+1)/2) = 1. For odd prime p and 0 <= k < p  1, notice that if k is an odd number of the form 1 + gcd(x, p1) and x != (p  1)/2, then k <= floor((p + 2)/3).  Jinyuan Wang, Jan 23 2021
For n >= 2, a(n) is the least prime p such that p  1 has n  1 odd divisors.  Jinyuan Wang, Jan 23 2021


LINKS



EXAMPLE

1  1;
2  1, 1; : 1 distinct value
3  1, 3, 1; : 2 distinct values
4  1, 2, 1, 3;
5  1, 5, 1, 1, 1; : 2 distinct values
6  1, 3, 1, 3, 1, 3;
7  1, 7, 1, 3, 1, 3, 1; : 3 distinct values


PROG

(PARI) T(n, k) = sum(m=0, n1, Mod(m, n)^k == m)/sum(m=0, n1, Mod(m, n)^k == m); \\ A334006
a(n) = my(p=2); while (#Set(vector(p, k, T(p, k))) != n, p = nextprime(p+1)); p; \\ Michel Marcus, Jan 21 2021
(PARI) lista(nn, show=50) = my(c, v=vector(show)); v[1]=2; forprime(p=3, nn, c=1+numdiv(p\2^valuation(p1, 2)); if(c<=show && !v[c], v[c]=p)); v; \\ Jinyuan Wang, Jan 23 2021


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



