This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A340281 #56 May 23 2022 04:02:08 %S A340281 2,3,7,19,31,163,127,1459,211,883,811,472393,631,8503057,32077,4051, %T A340281 2311,86093443,4951,6347497291777,10531,36451,1299079,251048476873, %U A340281 8191,388963,5314411,22051,51031,596046447753906250001,28351,411782264189299,24571,5904901 %N 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. %C A340281 a(n) is the least prime p such that there are n distinct terms in the p-th row of A334006. %C A340281 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). %C A340281 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 %C A340281 For n >= 2, a(n) is the least prime p such that p - 1 has n - 1 odd divisors. - _Jinyuan Wang_, Jan 23 2021 %H A340281 Seth A. Troisi, <a href="/A340281/b340281.txt">Table of n, a(n) for n = 1..200</a> %e A340281 A334006 triangle begins: %e A340281 1 | 1; %e A340281 2 | 1, 1; : 1 distinct value %e A340281 3 | 1, 3, 1; : 2 distinct values %e A340281 4 | 1, 2, 1, 3; %e A340281 5 | 1, 5, 1, 1, 1; : 2 distinct values %e A340281 6 | 1, 3, 1, 3, 1, 3; %e A340281 7 | 1, 7, 1, 3, 1, 3, 1; : 3 distinct values %o A340281 (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 %o A340281 a(n) = my(p=2); while (#Set(vector(p, k, T(p,k))) != n, p = nextprime(p+1)); p; \\ _Michel Marcus_, Jan 21 2021 %o A340281 (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 %Y A340281 Cf. A001227, A019434, A058500, A074781, A334006. %K A340281 nonn %O A340281 1,1 %A A340281 _Juri-Stepan Gerasimov_, Jan 02 2021 %E A340281 More terms from _Jinyuan Wang_, Jan 23 2021 %E A340281 Typo in a(34) corrected by _Seth A. Troisi_, May 22 2022