|
|
A359395
|
|
Least odd prime p in position n in the prime factorization of M(p) = 2^(p - 1) - 1.
|
|
0
|
|
|
3, 5, 17, 13, 71, 37, 157, 61, 211, 313, 1289, 241, 337, 181, 577, 601, 541, 1381, 421, 1201, 1009, 1621, 1873, 3433, 4561, 1801, 3301, 2161, 3061, 5281, 3361, 2521, 7393, 6481, 4201, 4621, 8737, 9181, 6301, 19501, 7561, 16633, 12241, 26881, 15601, 9241, 21001, 14281, 12601, 53551
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
M(5) = 15 = 3*5 and 5 is in second position in the prime factorization of M(5), and no lesser odd prime satisfies this, so a(2) = 5.
M(17) = 65535 = 3*5*17*257 and 17 is in third position in the prime factorization of M(17), and no lesser odd prime satisfies this, so a(3) = 17.
|
|
MATHEMATICA
|
f[n_] := Module[{p = Prime[n]}, Count[Prime[Range[n - 1]], _?(PowerMod[2, p - 1, #] == 1 &)] + 1]; f[1] = 0; With[{s = Array[f, 4000]}, ind = TakeWhile[ FirstPosition[s, #] & /@ Range[Max[s]] // Flatten, NumberQ ]; Prime[ind]] (* Amiram Eldar, Jan 02 2023 *)
|
|
PROG
|
(PARI) isok(p, n) = my(f=factor(2^(p-1) - 1, p+1)); if (#f~ < n, 0, f[n, 1] == p);
a(n) = my(p=3); while(!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Jan 13 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|