login
a(n) is the largest value of k such that binomial(2*m-1, m-1) == 1 (mod m^k) for m = 2*n + 1.
0

%I #22 Apr 23 2021 06:38:26

%S 2,3,3,1,3,3,0,3,3,0,3,1,0,3,3,0,0,3,0,3,3,0,3,1,0,3,0,0,3,3,0,0,3,0,

%T 3,3,0,0,3,0,3,0,0,3,0,0,0,3,0,3,3,0,3,3,0,3,0,0,0,1,0,1,3,0,3,0,0,3,

%U 3,0,0,0,0,3,3,0,0,3,0,0,3,0,3,1,0,3,0

%N a(n) is the largest value of k such that binomial(2*m-1, m-1) == 1 (mod m^k) for m = 2*n + 1.

%C If 2*n + 1 is a prime >= 5, then a(n) >= 3 by Wolstenholme's theorem.

%C If 2*n + 1 is a Wolstenholme prime (A088164), then a(n) >= 4.

%C If 2*n + 1 is a term of A267824, then a(n) >= 2.

%C If 2*n + 1 is the square of an odd prime, the cube of a prime >= 5 or a term of A228562, then a(n) >= 1.

%p a := proc(n) local x, x0, y, k, bound; bound := 1000;

%p x := 2*n + 1; x0 := x;

%p y := binomial(4*n + 1, 2*n);

%p for k from 0 to bound while y mod x = 1 do

%p x := x * x0 od;

%p if k < bound then k else print("No k below ", bound) fi end:

%p seq(a(n), n = 1..100); # _Peter Luschny_, Apr 22 2021

%o (PARI) a(n) = my(x=2*n+1, b=binomial(2*x-1, x-1)); for(k=1, oo, if(Mod(b, x^k)!=1, return(k-1)))

%Y Cf. A005408, A088164, A136327, A228562, A267824.

%K nonn

%O 1,1

%A _Felix Fröhlich_, Apr 18 2021