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”).

a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p is the first prime that divides (prime(n)^(p-1) - 1)/p.
2

%I #10 Oct 23 2024 01:29:06

%S 487,4,1,1,46,1,0,1,11,1,2,1,0,2

%N a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p is the first prime that divides (prime(n)^(p-1) - 1)/p.

%C a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p = A174422(n) is the first Wieferich prime base prime(n).

%C a(n) = (prime(n)^(p-1) - 1)/p^2 mod p, where p is the first prime such that p^2 divides prime(n)^(p-1) - 1.

%C See references and additional comments, links, and cross-refs in A001220 and A039951.

%C a(15) > 2451011, a(16) = 1, a(17) = 4, a(18) = 1, a(19) = 5, a(20) = 2, a(21) = 0, a(22) = 6, a(23) = 1186, a(24) = 0, a(25) = 0, a(26) = 1, a(27) > 10^5, a(28) = 0, a(29) = 1, a(30) = 0, a(31) = 1, a(32) = 7, a(33) = 0, a(35) = 1, a(36) = 4, a(37) = 1, a(38) = 0, a(40) = 1, a(41) = 2, a(42) = 1, a(43) = 2, a(44) = 0, a(45) = 1, a(46) = 2, a(48) = 30, a(49) = 3, a(50) = 1. - _J.W.L. (Jan) Eerland_, Sep 27 2024

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Fermat_quotient#Generalized_Wieferich_primes">Generalized Wieferich primes</a>

%F a(n) = k mod 2, if prime(n) = 4k+1.

%F a(n) = A178814(prime(n)) .

%F a(1) = A178812(1).

%e Prime(2) = 3 and the first prime p that divides (3^(p-1) - 1)/p is 11, so a(2) = (3^10 - 1)/11^2 mod 11 = 488 mod 11 = 4.

%t Table[If[IntegerQ[s[[2]]],s,{s[[1]], "no solution in range 1 <= k <= 10^5"}], {s,Table[k = 1;Monitor[Parallelize[While[k <= 10^5,If[IntegerQ[((Prime[n]^(Prime[k] - 1) - 1)/Prime[k])/Prime[k]],Break[]]; k++];{n, Mod[(Prime[n]^(Prime[k] - 1) - 1)/Prime[k]^2, Prime[k]]}],k], {n, 1, 10}]}] (* _J.W.L. (Jan) Eerland_, Sep 27 2024 *)

%Y Cf. A001220, A039951, A174422, A178812, A178814.

%K hard,more,nonn

%O 1,1

%A _Jonathan Sondow_, Jun 17 2010