cp's OEIS Frontend

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.

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.

Original entry on oeis.org

7, 17, 13, 18, 47, 44, 59, 5, 94, 38, 41, 112, 25, 133, 242, 223, 172, 226, 74, 188, 204, 61, 344, 250, 249, 128, 344, 317, 395, 399, 339, 306, 262, 347, 398, 412, 31, 440, 355, 835, 757, 737, 300, 713, 772, 190, 535, 301, 808, 137, 1013, 738, 647, 730, 1119
Offset: 1

Views

Author

Felix Fröhlich, Dec 11 2016

Keywords

Comments

T(n, k) = 2 iff (p, q) is a double Wieferich prime pair.

Examples

			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.
Triangle starts
    7;
   17,  13;
   18,  47,  44;
   59,   5,  94,  38;
   41, 112,  25, 133, 242;
  223, 172, 226,  74, 188,  204;
   61, 344, 250, 249, 128,  344, 317;
  395, 399, 339, 306, 262,  347, 398, 412;
   31, 440, 355, 835, 757,  737, 300, 713, 772;
  190, 535, 301, 808, 137, 1013, 738, 647, 730, 1119;
		

Crossrefs

Programs

  • PARI
    t(n, k) = lift(Mod(prime(n), prime(k)^2)^(prime(k)-1)) + lift(Mod(prime(k), prime(n)^2)^(prime(n)-1))
    trianglerows(n) = for(x=2, n+1, for(y=1, x-1, print1(t(x, y), ", ")); print(""))
    trianglerows(6) \\ print upper 6 rows of triangle