A273339 Smallest composite c such that n^(c-1) != 1 (mod c^2), i.e., smallest composite c that is not a "Wieferich pseudoprime" to base n.
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4
Offset: 2
Keywords
Links
- Felix Fröhlich, Table of n, a(n) for n = 2..10000
Programs
-
Maple
f:= proc(n) local c; for c from 4 do if not isprime(c) and n &^(c-1) mod (c^2) <> 1 then return c fi od end proc: map(f, [$2..100]); # Robert Israel, Aug 15 2025
-
Mathematica
A273339[n_] := NestWhile[#+1 &, 4, PrimeQ[#] || PowerMod[n, #-1, #^2] == 1 &]; Array[A273339, 100, 2] (* Paolo Xausa, Aug 15 2025 *)
-
PARI
a(n) = forcomposite(c=1, , if(Mod(n, c^2)^(c-1)!=1, return(c)))
Comments