login
A273340
Smallest base b such that A273339(b) = A002808(n); i.e., smallest base b > 1 such that the n-th composite number is the smallest "non-Wieferich pseudoprime" to base b, or -1 if no such b exists.
1
2, 17, 145, 577, 5185, -1, 19601
OFFSET
1,1
COMMENTS
a(9) = 6350401, a(13) = 25401601.
EXAMPLE
For n = 6, the sixth composite is 12. If A273339(x) is not 4 or 6, then x == 1 (mod 16) and x == 1 (mod 36), which implies x == 1 (mod 12^2), and so A273339(x) can't be 12. Therefore a(6) must be -1.
PROG
(PARI) composite(n) = my(i=0, c=2); while(1, if(!ispseudoprime(c), i++); if(i==n, return(c)); c++)
a273339(n) = forcomposite(c=1, , if(Mod(n, c^2)^(c-1)!=1, return(c)))
a(n) = my(b=2, c=composite(n)); while(a273339(b)!=c, b++); b
CROSSREFS
Sequence in context: A037636 A163066 A110815 * A074624 A374377 A245807
KEYWORD
sign,more
AUTHOR
Felix Fröhlich, May 20 2016
EXTENSIONS
a(6)-a(7) from Robert Israel, Aug 15 2025
STATUS
approved