The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 (list; graph; refs; listen; history; text; internal format)
 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. Wikipedia, Generalized Wieferich primes 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 Cf. A001220, A178844. Sequence in context: A075791 A262626 A104435 * A248743 A085398 A252503 Adjacent sequences:  A178812 A178813 A178814 * A178816 A178817 A178818 KEYWORD nonn AUTHOR Jonathan Sondow, Jun 17 2010, Jun 24 2010, Jun 25 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 28 04:39 EST 2020. Contains 332321 sequences. (Running on oeis4.)