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 A274916 #45 Oct 28 2021 10:00:28 %S A274916 7,17,13,18,47,44,59,5,94,38,41,112,25,133,242,223,172,226,74,188,204, %T A274916 61,344,250,249,128,344,317,395,399,339,306,262,347,398,412,31,440, %U A274916 355,835,757,737,300,713,772,190,535,301,808,137,1013,738,647,730,1119 %N A274916 Triangle T(n, k) read by rows: sum of residues p^(q-1) (mod q^2) and q^(p-1) (mod p^2), where p = prime(n) and q = prime(k) for k = 1, 2, ...., n-1. %C A274916 T(n, k) = 2 iff (p, q) is a double Wieferich prime pair. %H A274916 Wikipedia, <a href="http://en.wikipedia.org/wiki/Wieferich_pair">Wieferich pair</a> %e A274916 For n = 652 and k = 23: prime(23) = 83 and prime(652) = 4871. 83 and 4871 form a double Wieferich prime pair, so 83^4870 (mod 4871^2) = 1 and 4871^82 (mod 83^2) = 1, hence T(652, 23) = 1+1 = 2. %e A274916 Triangle starts %e A274916 7; %e A274916 17, 13; %e A274916 18, 47, 44; %e A274916 59, 5, 94, 38; %e A274916 41, 112, 25, 133, 242; %e A274916 223, 172, 226, 74, 188, 204; %e A274916 61, 344, 250, 249, 128, 344, 317; %e A274916 395, 399, 339, 306, 262, 347, 398, 412; %e A274916 31, 440, 355, 835, 757, 737, 300, 713, 772; %e A274916 190, 535, 301, 808, 137, 1013, 738, 647, 730, 1119; %o A274916 (PARI) t(n, k) = lift(Mod(prime(n), prime(k)^2)^(prime(k)-1)) + lift(Mod(prime(k), prime(n)^2)^(prime(n)-1)) %o A274916 trianglerows(n) = for(x=2, n+1, for(y=1, x-1, print1(t(x, y), ", ")); print("")) %o A274916 trianglerows(6) \\ print upper 6 rows of triangle %Y A274916 Cf. A124121, A124122, A126432, A266829. %K A274916 nonn,tabl %O A274916 1,1 %A A274916 _Felix Fröhlich_, Dec 11 2016