cp's OEIS Frontend

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.

A178815 First base of a nonzero Fermat quotient mod the n-th prime.

This page as a plain text file.
%I A178815 #16 Sep 07 2023 04:42:53
%S A178815 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,
%T A178815 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,
%U A178815 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
%N A178815 First base of a nonzero Fermat quotient mod the n-th prime.
%C A178815 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.
%C A178815 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).
%C A178815 Additional comments, references, links, and cross-refs are in A001220.
%C A178815 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
%H A178815 A. Ostafe and I. Shparlinski, <a href="http://arxiv.org/abs/1001.1504">Pseudorandomness and Dynamics of Fermat Quotients</a>, arXiv:1001.1504 [math.NT], 2010.
%H A178815 Wikipedia, <a href="http://en.wikipedia.org/wiki/Fermat_quotient#Generalized_Wieferich_primes">Generalized Wieferich primes</a>
%F A178815 a(n) = 2 if n > 1 and p_n is not a Wieferich prime A001220.
%F A178815 a(n) > 2 if p_n is a Wieferich prime.
%F A178815 A178844(n) = ((a(n)^(p-1) - 1)/p) mod p, where p = p_n.
%e A178815 p_1 = 2 and 2^2 divides 1^(2-1) - 1 = 0 but not 3^(2-1) - 1 = 2, so a(1) = 3.
%e A178815 p_4 = 7 and 7^2 does not divide 2^(7-1) - 1 = 63, so a(4) = 2.
%e A178815 p_183 = 1093 and 1093^2 divides 2^1092 - 1 but not 3^1092 - 1, so a(183) = 3.
%e A178815 Similarly, p_490 = 3511 and a(490) = 3. See A001220.
%t A178815 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 *)
%o A178815 (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
%Y A178815 Cf. A001220, A178844.
%K A178815 nonn
%O A178815 1,1
%A A178815 _Jonathan Sondow_, Jun 17 2010, Jun 24 2010, Jun 25 2010