A343252 a(n) is the least k0 <= n such that v_7(n), the 7-adic order of n, can be obtained by the formula: v_7(n) = log_7(n / L_7(k0, n)), where L_7(k0, n) is the lowest common denominator of the elements of the set S_7(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 7} or 0 if no such k0 exists.
1, 2, 3, 4, 5, 3, 1, 8, 9, 5, 11, 4, 13, 2, 5, 16, 17, 9, 19, 5, 3, 11, 23, 8, 25, 13, 27, 4, 29, 5, 31, 32, 11, 17, 5, 9, 37, 19, 13, 8, 41, 3, 43, 11, 9, 23, 47, 16, 1, 25, 17, 13, 53, 27, 11, 8, 19, 29, 59, 5, 61, 31, 9, 64, 13, 11, 67, 17, 23, 5, 71, 9, 73, 37, 25, 19, 11, 13, 79, 16
Offset: 1
Keywords
Examples
For n = 10, a(10) = 5. To understand this result, consider the largest set S_7, which is the S_7(k0=10, 10). According to the definition, S_7(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 7. The elements of S_7(10, 10) are {1, 9/2, 12, 21, 126/5, 21, 0, 9/2, 1, 1/10}, where the zero was inserted pedagogically to identify the skipped term, i.e., when k is divisible by 7. At this point we verify which of the nested subsets {1}, {1, 9/2}, {1, 9/2, 12}, {1, 9/2, 12, 21}, ... will match for the first time the p-adic order's formula. If k varies from 1 to 5 (instead of 10) we see that the lowest common denominator of the set S_7(5, 10) will be 10. So, L_7(5, 10) = 10 and the equation v_7(10) = log_7(10/10) yields a True result. Then we may say that a(10) = 5 specifically because 5 was the least k0.
Links
- 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.
Programs
-
Mathematica
j = 4; 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, 7]}, While[Log[7, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 7] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
-
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=7) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)); ); n; } \\ Michel Marcus, Apr 22 2021
Comments