nt.number theory – Effective algorithm to calculate the $p$-adic valuation of $p$-adic algebraic numbers

Fix an odd prime number $p$. Let $alpha$ be an algebraic number over $mathbb{Q}_p$ that can be expressed in radicals (for example, $zeta_9=left(frac{-1+sqrt{-3}}{2}right)^{1/3}-1inbar{mathbb{Q}}_3$). How do we compute $v_p(alpha)$, where $v_p$ is the $p$-adic valuation on $bar{mathbb{Q}}_p$ with $v_p(p)=1$?

A standard way to do so is calculating the minimal polynomial $sum_{i=0}^na_ix^i$ of $alpha$ over $mathbb{Q}_p$, then $v_p(alpha)=frac{1}{n}v_pleft(frac{a_0}{a_n}right)$. The algorithm for minimal polynomial is implemented in several popular software: SageMath, Mathematica, etc.

However, the minimal polynomial is very expansive in the computational sense, especially when the radical structure of $alpha$ is complicated. Although $v_p(alpha)$ is never meant to be easy to compute, we observe that we don’t need the full information of the minimal polynomial. Instead, the coefficient of leading term and the constant term and the degree is enough.

So the question here is that, whether we can simplify the algorithm for minimal polynomials to compute the $p$-adic valuation? Or is there any other valuation-oriented algorithm to do that? It seems that the mechanism behind the calculation of minimal polynomial is matrices computation, so maybe extract only part of the coefficients of minimal polynomial is not easy.

Average of series of real numbers`

Here two series of 300 real numbers: S1 with sum 1500, and S2 with sum K. A third series S3 is constructed by picking 300 numbers from S1 or S2 at random and multiplying each by 5. A forth series S4 is constructed by picking the remaining 300 numbers of S1 and S2 and multiplying each by 5. What is the average of all elements in S3+S4?

I figured that it has to be 1500/300=5 but I am not sure.

versioning – When to add version numbers to documentation

It is often useful to document when (i.e. in which versions) a feature was added, marked as deprecated, etc. For example:

Function FooBar(x, y, z)

Foos x with y and bars them with z.

(Parameter z was added in version 1.2)

I’m wondering when and how those notices are best added, and I can think of two alternatives:

  1. When the underlying code is changed
  2. When the release is made

Alternative 1 has the benefit that it keeps code and documentation in sync. However, it requires me to know the next version number in advance. In my experience, that is often not possible, because the feature may be delayed (even though the code is already there) and hence not end up in the originally targeted version.

Alternative 2 avoids that issue, but complicates the release process because you have to go over your change log and update the documentation accordingly.

nt.number theory – Some conjectural congruences involving Domb numbers

The Domb numbers are given by
$$D_n=sum_{k=0}^nbinom{n}{k}^2binom{2k}kbinom{2(n-k)}{n-k} (n=0,1,2,ldots).$$
Such numbers have combinatorial interpretation, see, e.g., http://oeis.org/A002895.

I have the following three conjectures on congruences involving the Domb numbers.

Conjecture 1 (2019). For any odd prime $p$, we have
$$sum_{k=1}^{p-1}frac{D_k}kequivleft(frac p3right)frac 25pB_{p-2}left(frac13right)pmod{p^2},$$
where $(-)$ is the Legendre symbol and $B_{p-2}(x)$ is the Bernoulli polynomial of degree $p-2$.

Conjecture 2 (2020). For any prime $p>5$, we have
$$sum_{k=1}^{p-1}frac1kleft(D_k-frac{4D_{k-1}}{64^{k-1}}right)equiv-frac{16}3p^2B_{p-3}pmod{p^3},$$
where $B_0,B_1,ldots$ are the Bernoulli numbers.

Conjecture 3 (2013). For any odd prime $p$, we have
$$det(D_{i+j})_{0le i,jle p-1}equivbegin{cases}(frac{-1}p)(4x^2-2p)pmod{p^2}&mbox{if} p=x^2+3y^2 (x,yinmathbb Z),\0pmod{p^2}&mbox{if} pequiv 2pmod 3.end{cases}$$

Conjectures 1 and 3 appeared in Conjecture 79 of my published paper Open Conjectures on Congruences. I have not made Conjecture 2 public before, I can prove the congruence in Conjecture 2 modulo $p$.

QUESTION. Any ideas towards solving these conjectures?

Devising an algorithm to remove “complete” sets of numbers from a list of numbers

Suppose I have a list of numbers consisting of numbers 1 through 5, where some numbers repeat. Define a set of numbers to be “complete” if it consists of each of the numbers 1-5 exactly once. Now, I want to pull out as many possible complete, sorted (lowest to highest) sets from this list. How can I do this (efficiently)?

Here is the solution I have in mind so far. Traverse through the list, and place each number into a pile of numbers that is the same number. For example, place all the 1s into a pile, all the 2s into a pile, and so on. Then, go through all of the piles and determine the minimum number of elements in a pile. For example, if the pile of 2s has five 2s and all other piles have greater than or equal to five elements, then 5 is the minimum number of elements. This minimum, call it min, will give us the number of complete sets in the list. Finally, go through the piles in order and pull out the elements one by one until you form a complete set, and again to form another complete set, and so on until min number of complete sets. Tada! You now have pulled out as many possible complete, sorted sets from this list.

Here is an example:

Let’s say the list is 3 2 1 2 2 3 4 5 5 4 4 3 4 1 1 2 5. We traverse the list and put them into piles:

333 2222 111 4444 555

The minimum number of elements in a pile is 3, so we have 3 complete sets. Now just go through the piles in order and pick up elements one by one:

12345
12345
12345

And tada! We have pulled out as many complete, sorted sets as possible.

Where I am lacking in my solution is figuring out how to efficiently go through the piles in order or make an efficient way of ordering the piles so that I can easily go through them in order.

I’d love to hear any feedback, especially other algorithms you might devise or ways to go about ordering. Thanks!

contacts – Accessing list or raw data for blocked numbers?

I’m using some vendor’ stock ROM but I as far as I understand it still uses Blocked Numbers Storagecom.android.providers.blockednumber, however I cant seems to find a way to export or back it up.

Is it possible with Tasker?
Is it possible with root? Any API that can get me access to it, if I have root and will set my test palceholder app as a default dialer? I’m willing to use some Xamarin template to make it work.