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.
%I A255901 #25 Nov 13 2024 05:38:11 %S A255901 5,17,19,116,99,361,1451,1693,10768,13834,208301,548291 %N A255901 Smallest base b such that there exist exactly n Wieferich primes (primes p satisfying b^(p-1) == 1 (mod p^2)) less than b. %F A255901 For all n a(n) <= A252232(n). %F A255901 a(n) = A252232(n) iff a(n) is prime. %e A255901 From _Robert G. Wilson v_, Mar 11 2015: (Start) %e A255901 n b p %e A255901 1: 5 {2} %e A255901 2: 17 {2, 3} %e A255901 3: 19 {3, 7, 13} %e A255901 4: 116 {3, 7, 19, 47} %e A255901 5: 99 {5, 7, 13, 19, 83} %e A255901 6: 361 {2, 3, 7, 13, 43, 137} %e A255901 7: 1451 {5, 7, 11, 13, 83, 173, 1259} %e A255901 8: 1693 {2, 3, 5, 11, 31, 37, 61, 109} %e A255901 9: 10768 {5, 11, 17, 19, 79, 101, 139, 6343, 10177} %e A255901 10: 13834 {3, 11, 17, 19, 43, 139, 197, 2437, 5849, 6367} %e A255901 11: 208301 {2, 5, 29, 47, 59, 113, 661, 8209, 13679, 15679, 55633} %e A255901 12: 548291 {7, 11, 19, 29, 31, 37, 97, 211, 547, 911, 2069, 28927} %e A255901 ... (End) %t A255901 f[n_] := Block[{b = 2, p}, While[p = Prime@ Range@ PrimePi[b - 1]; Count[ PowerMod[b, p - 1, p^2], 1] != n, b++]; b]; Array[f, 11] (* _Robert G. Wilson v_, Mar 11 2015 *) %o A255901 (PARI) for(n=1, 10, b=2; while(b > 0, i=0; forprime(p=1, b, if(Mod(b, p^2)^(p-1)==1, i++)); if(i==n, print1(b, ", "); break({1})); b++)) %o A255901 (Python) %o A255901 from itertools import count %o A255901 from sympy import primerange %o A255901 def A255901(n): %o A255901 for b in count(1): %o A255901 if n == sum(1 for p in primerange(2,b+1) if pow(b,p-1,p**2) == 1): %o A255901 return b # _Chai Wah Wu_, May 18 2022 %Y A255901 Cf. A252232, A255885. %K A255901 nonn,more %O A255901 1,1 %A A255901 _Felix Fröhlich_, Mar 10 2015 %E A255901 a(11) from _Robert G. Wilson v_, Mar 11 2015 %E A255901 a(12) from _Robert G. Wilson v_, Mar 12 2015