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 A244249 #30 Oct 28 2021 06:29:50 %S A244249 5,9,8,13,10,7,17,17,18,18,21,19,24,19,3,25,26,26,30,9,19,29,28,32,31, %T A244249 27,22,38,33,35,43,48,40,23,40,28,37,37,49,50,81,70,65,54,28,41,44,51, %U A244249 67,94,80,75,62,42,14,45,46,57,68,112,89,110,68,63,41,115 %N A244249 Table A(n,k) in which n-th row lists in increasing order all bases b to which p = prime(n) is a Wieferich prime (i.e., b^(p-1) is congruent to 1 mod p^2), read by antidiagonals. %H A244249 Alois P. Heinz, <a href="/A244249/b244249.txt">Rows n = 1..141, flattened</a> %e A244249 Table starts with: %e A244249 p = 2: 5, 9, 13, 17, 21, 25, 29, 33, ... %e A244249 p = 3: 8, 10, 17, 19, 26, 28, 35, 37, ... %e A244249 p = 5: 7, 18, 24, 26, 32, 43, 49, 51, ... %e A244249 p = 7: 18, 19, 30, 31, 48, 50, 67, 68, ... %e A244249 p = 11: 3, 9, 27, 40, 81, 94, 112, 118, ... %e A244249 p = 13: 19, 22, 23, 70, 80, 89, 99, 146, ... %e A244249 p = 17: 38, 40, 65, 75, 110, 131, 134, 155, ... %p A244249 A:= proc(n, k) option remember; local p, b; %p A244249 p:= ithprime(n); %p A244249 for b from 1 +`if`(k=1, 1, A(n, k-1)) %p A244249 while b &^ (p-1) mod p^2<>1 %p A244249 do od; b %p A244249 end: %p A244249 seq(seq(A(n, 1+d-n), n=1..d), d=1..14); # _Alois P. Heinz_, Jul 02 2014 %t A244249 A[n_, k_] := A[n, k] = Module[{p, b}, p = Prime[n]; For[b = 1 + If[k == 1, 1, A[n, k-1]], PowerMod[b, p-1, p^2] != 1, b++]; b]; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 14}] // Flatten (* _Jean-François Alcover_, Mar 09 2015, after _Alois P. Heinz_ *) %o A244249 (PARI) forprime(p=2, 10^1, print1("p=", p, ": "); for(a=2, 10^2, if(Mod(a, p^2)^(p-1)==1, print1(a, ", "))); print("")) %Y A244249 Cf. A001220, A185103. %Y A244249 First column of table is A039678. %Y A244249 Main diagonal gives A280721. %K A244249 nonn,tabl %O A244249 1,1 %A A244249 _Felix Fröhlich_, Jun 23 2014