OFFSET
1,1
COMMENTS
a(n) is the least prime p such that there are n distinct terms in the p-th 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 k-th 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, p-1)) 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, p-1) 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
Seth A. Troisi, Table of n, a(n) for n = 1..200
EXAMPLE
A334006 triangle begins:
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, n-1, Mod(m, n)^k == m)/sum(m=0, n-1, -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(p-1, 2)); if(c<=show && !v[c], v[c]=p)); v; \\ Jinyuan Wang, Jan 23 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jan 02 2021
EXTENSIONS
More terms from Jinyuan Wang, Jan 23 2021
Typo in a(34) corrected by Seth A. Troisi, May 22 2022
STATUS
approved