login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330526 a(n) = (p-1)! mod p^3, where p = prime(n). 1

%I #18 Jan 09 2024 18:20:41

%S 1,2,24,34,494,675,4419,4008,4944,13136,21730,23531,14103,41236,86432,

%T 77644,64250,148534,243209,141005,384490,373985,29215,101281,543102,

%U 109281,154396,1122108,965630,1006716,1283207,152876,2147337,1419745,1545874,1381045,1108262,123879

%N a(n) = (p-1)! mod p^3, where p = prime(n).

%H Robert Israel, <a href="/A330526/b330526.txt">Table of n, a(n) for n = 1..10000</a>

%H 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 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 a(n)= A177771(n) mod A030078(n).

%p f:= proc(n) local p,p3,k,r;

%p p:= ithprime(n);

%p p3:= p^3;

%p r:= 1:

%p for k from 1 to p-1 do

%p r:= r*k mod p3

%p od;

%p r

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Dec 18 2019

%t Mod[(#-1)!,#^3]&/@Prime[Range[40]] (* _Harvey P. Dale_, Jan 09 2024 *)

%o (PARI) a(n) = my(p=prime(n)); (p-1)! % p^3;

%o (Magma) [Factorial(p-1)mod p^3: p in PrimesUpTo(170)]; // _Marius A. Burtea_, Dec 18 2019

%Y Cf. A030078, A112660, A177771.

%K nonn

%O 1,2

%A _Michel Marcus_, Dec 17 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 16:58 EDT 2024. Contains 371254 sequences. (Running on oeis4.)