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 A330526 #18 Jan 09 2024 18:20:41 %S A330526 1,2,24,34,494,675,4419,4008,4944,13136,21730,23531,14103,41236,86432, %T A330526 77644,64250,148534,243209,141005,384490,373985,29215,101281,543102, %U A330526 109281,154396,1122108,965630,1006716,1283207,152876,2147337,1419745,1545874,1381045,1108262,123879 %N A330526 a(n) = (p-1)! mod p^3, where p = prime(n). %H A330526 Robert Israel, <a href="/A330526/b330526.txt">Table of n, a(n) for n = 1..10000</a> %H A330526 Claire Levaillant, <a href="https://arxiv.org/abs/1912.06652">Wilson's theorem modulo p^2 derived from Faulhaber polynomials</a>, arXiv:1912.06652 [math.CO], 2019. %H A330526 Zhi-Hong Sun, <a href="https://doi.org/10.1016/S0166-218X(00)00184-0">Congruences concerning Bernoulli numbers and Bernoulli polynomials</a>, Discrete Applied Math. 105 (2000) 193 - 223. %F A330526 a(n)= A177771(n) mod A030078(n). %p A330526 f:= proc(n) local p,p3,k,r; %p A330526 p:= ithprime(n); %p A330526 p3:= p^3; %p A330526 r:= 1: %p A330526 for k from 1 to p-1 do %p A330526 r:= r*k mod p3 %p A330526 od; %p A330526 r %p A330526 end proc: %p A330526 map(f, [$1..100]); # _Robert Israel_, Dec 18 2019 %t A330526 Mod[(#-1)!,#^3]&/@Prime[Range[40]] (* _Harvey P. Dale_, Jan 09 2024 *) %o A330526 (PARI) a(n) = my(p=prime(n)); (p-1)! % p^3; %o A330526 (Magma) [Factorial(p-1)mod p^3: p in PrimesUpTo(170)]; // _Marius A. Burtea_, Dec 18 2019 %Y A330526 Cf. A030078, A112660, A177771. %K A330526 nonn %O A330526 1,2 %A A330526 _Michel Marcus_, Dec 17 2019