OFFSET
1,2
COMMENTS
Conjecture: a(n) is the greatest power of a prime different from 3 that divides n.
LINKS
Dario T. de Castro, Table of n, a(n) for n = 1..1000
Dario T. de Castro, P-adic Order of Positive Integers via Binomial Coefficients, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 22, Paper A61, 2022.
EXAMPLE
For n = 10, a(10) = 5. To understand this result, consider the largest set S_3, which is the S_3(k0=10, 10). According to the definition, S_3(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 3. The elements of S_3(10, 10) are: {1, 9/2, 0, 21, 126/5, 0, 12, 9/2, 0, 1/10}, where the zeros were put pedagogically to identify the skipped terms, i.e., when k is divisible by 3. At this point we verify which of the nested subsets {1}, {1, 9/2}, {1, 9/2, 0}, {1, 9/2, 0, 21}, {1, 9/2, 0, 21, 126/5},... will match for the first time the p-adic order’s formula. If k vary from 1 to 5 (instead of 10) we see that the lowest common denominator of the set S_3(5, 10) will be 10. So, L_3(5, 10) = 10 and the equation v_3(10) = log_3(10/10) yields a True result. Then we may say that a(10) = 5 specifically because 5 was the least k0.
MATHEMATICA
j = 2;
Nmax = 250;
Array[val, Nmax];
Do[val[i] = 0, {i, 1, Nmax}];
Do[flag = 0;
Do[If[(flag == 0 &&
Prime[j]^IntegerExponent[n, Prime[j]] ==
n/LCM[Table[
If[Divisible[k, Prime[j]], 1,
Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
List -> Sequence]), val[n] = k; flag = 1; , Continue], {k, 1,
n, 1}], {n, 1, Nmax}];
tabseq = Table[val[i], {i, 1, Nmax}];
(* alternate code *)
a[n_] := Module[{k = 1, v = IntegerExponent[n, 3]}, While[Log[3, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 3] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
PROG
(PARI) Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n, i)/n)); ); lcm(apply(denominator, Vec(list))); }
isok(k, n, v, p) = p^v == n/Lp(k, n, p);
a(n, p=3) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)); ); } \\ Michel Marcus, Apr 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Dario T. de Castro, Apr 09 2021
STATUS
approved