A307590 a(n) is the smallest base b such that q = b^n - b^m + 1 is prime, where m = A276976(n).
2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 4, 2, 2, 2, 8, 2, 2, 3, 2, 14, 11, 2, 11, 29, 11, 5, 19, 14, 6, 27, 2, 3, 21, 8, 7, 10, 3, 4, 2, 14, 3, 5, 106, 3, 2, 44, 4, 3, 43, 4, 4, 21, 6, 16, 25, 41, 3, 12, 14, 10, 2, 3, 81, 28, 27, 66, 37, 17, 61, 5, 22, 12, 179, 197, 49, 2, 132, 178, 11
Offset: 1
Keywords
Examples
a(9) = 5 so the number 5^9 - 5^3 + 1 is a prime q == 1 (mod 9).
Programs
-
Mathematica
fQ[n_, m_] := AllTrue[Range[2, n - 1], PowerMod[#, m, n] == PowerMod[#, n, n] &]; f[1] = 0; f[2] = 1; f[n_] := Module[{m = 0}, While[!fQ[n, m], m++]; m]; a[n_] := Module[{b = 2, m = f[n]}, While[!PrimeQ[b^n - b^m + 1], b++]; b]; Array[a, 79] (* Amiram Eldar, Apr 19 2019 *)
-
PARI
a276976(n)=if(n<3, return(n-1)); forstep(m=1, n, n%2+1, for(b=0, n-1, if(Mod(b, n)^m-Mod(b, n)^n, next(2))); return(m)); \\ A276976 a(n) = my(b=2); while (!isprime(b^n - b^a276976(n) + 1), b++); b; \\ Michel Marcus, Apr 21 2019
Formula
q == 1 (mod n).
Extensions
More terms from Amiram Eldar, Apr 19 2019
Comments