A275741 Sum of Wilson and Lerch remainders of n-th prime.
1, 3, 10, 6, 6, 17, 15, 11, 25, 38, 9, 37, 47, 39, 86, 58, 107, 50, 101, 36, 98, 45, 123, 92, 170, 57, 80, 72, 158, 194, 194, 67, 78, 133, 120, 302, 144, 158, 128, 97, 91, 303, 76, 191, 139, 178, 302, 117, 242, 179, 335, 390, 362, 197, 290, 314, 327, 227, 429
Offset: 2
Keywords
Links
- John Blythe Dobson, A Characterization of Wilson-Lerch Primes, Integers, 16 (2016), A51.
- René Gy, Generalized Lerch Primes, Integers 18 (2018), A10.
- Jonathan Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012.
Programs
-
Mathematica
a[n_] := Module[{p = Prime[n]}, Mod[((p-1)!+1)/p, p] + Mod[(Sum[(k^(p-1)-1)/p, {k, 1, p-1}] - ((p-1)!+1)/p)/p, p]]; Table[a[n], {n, 2, 60}] (* Jean-François Alcover, Feb 15 2019 *)
-
PARI
a002068(n) = my(p=prime(n)); ((p-1)!+1)/p % p a197631(n) = my(p=prime(n), m=p-1); sum(k=1, m, k^m, -p-m!)/p^2 % p a(n) = a002068(n) + a197631(n)
Comments