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 A275741 #41 Nov 08 2024 08:00:26 %S A275741 1,3,10,6,6,17,15,11,25,38,9,37,47,39,86,58,107,50,101,36,98,45,123, %T A275741 92,170,57,80,72,158,194,194,67,78,133,120,302,144,158,128,97,91,303, %U A275741 76,191,139,178,302,117,242,179,335,390,362,197,290,314,327,227,429 %N A275741 Sum of Wilson and Lerch remainders of n-th prime. %C A275741 a(n) = 0 if and only if prime(n) is in both A007540 and A197632, i.e., prime(n) is simultaneously a Wilson prime and a Lerch prime. %C A275741 For n > 2, a(n) = 0 if and only if A027641(3*p-3) / A027642(3*p-3)-1 + 1/p == 0 (mod p^2), where p = prime(n) (cf. Dobson, 2016, theorem 2). %C A275741 René Gy (see links) has shown that a number is simultaneously a Lerch prime and a Wilson prime if and only if it satisfies the congruence (p - 1)! + 1 == 0 (mod p^3). - _John Blythe Dobson_, Feb 23 2018 %H A275741 John Blythe Dobson, <a href="http://www.integers-ejcnt.org/q51/q51.Abstract.html">A Characterization of Wilson-Lerch Primes</a>, Integers, 16 (2016), A51. %H A275741 René Gy, <a href="http://math.colgate.edu/~integers/s10/s10.mail.html">Generalized Lerch Primes</a>, Integers 18 (2018), A10. %H A275741 Jonathan Sondow, <a href="http://arxiv.org/abs/1110.3113">Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771</a>, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012. %F A275741 a(n) = A002068(n) + A197631(n). %t A275741 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]]; %t A275741 Table[a[n], {n, 2, 60}] (* _Jean-François Alcover_, Feb 15 2019 *) %o A275741 (PARI) a002068(n) = my(p=prime(n)); ((p-1)!+1)/p % p %o A275741 a197631(n) = my(p=prime(n), m=p-1); sum(k=1, m, k^m, -p-m!)/p^2 % p %o A275741 a(n) = a002068(n) + a197631(n) %Y A275741 Cf. A002068, A007540, A197631, A197632. %K A275741 nonn %O A275741 2,2 %A A275741 _Felix Fröhlich_, Aug 07 2016