login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A178815
First base of a nonzero Fermat quotient mod the n-th prime.
3
3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
OFFSET
1,1
COMMENTS
First number m coprime to p = p_n such that p does not divide q_p(m), where q_p(m) = (m^(p-1) - 1)/p is the Fermat quotient of p to the base m.
It is known that a(n) = O((log p_n)^2) as n -> oo. It is conjectured that a(n) = 3 if p_n is a Wieferich prime. See Section 1.1 in Ostafe-Shparlinski (2010).
Additional comments, references, links, and cross-refs are in A001220.
a(n) > 3 iff prime(n) is a term of both A001220 and A014127, i.e., iff A240987(n) = 2. - Felix Fröhlich, Jul 09 2016
LINKS
A. Ostafe and I. Shparlinski, Pseudorandomness and Dynamics of Fermat Quotients, arXiv:1001.1504 [math.NT], 2010.
FORMULA
a(n) = 2 if n > 1 and p_n is not a Wieferich prime A001220.
a(n) > 2 if p_n is a Wieferich prime.
A178844(n) = ((a(n)^(p-1) - 1)/p) mod p, where p = p_n.
EXAMPLE
p_1 = 2 and 2^2 divides 1^(2-1) - 1 = 0 but not 3^(2-1) - 1 = 2, so a(1) = 3.
p_4 = 7 and 7^2 does not divide 2^(7-1) - 1 = 63, so a(4) = 2.
p_183 = 1093 and 1093^2 divides 2^1092 - 1 but not 3^1092 - 1, so a(183) = 3.
Similarly, p_490 = 3511 and a(490) = 3. See A001220.
MATHEMATICA
Table[b = 2; While[PowerMod[b, Prime[n] - 1, #^2] == 1 || GCD[b, #] > 1, b++] &@ Prime@ n; b, {n, 120}] (* Michael De Vlieger, Jul 09 2016 *)
PROG
(PARI) a(n) = my(b=2, p=prime(n)); while(Mod(b, p^2)^(p-1)==1 || gcd(b, p) > 1, b++); b \\ Felix Fröhlich, Jul 09 2016
CROSSREFS
Sequence in context: A075791 A262626 A104435 * A248743 A085398 A252503
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Jun 17 2010, Jun 24 2010, Jun 25 2010
STATUS
approved