Power of 2 with the same number of decimal digits?

Is there an integer $$n$$ such that the decimal representation of $$2 ^ n$$ have an equal number of decimal digits $${0, dots, 9 }$$, each one appears 10% of the time?

The closest I could find was $$n = 637,995$$ of which $$2 ^ n$$ has 192,056 digits broken down as

``````0 19211 10.0028%
1 19189 9.9913%
2 19217 10.0059%
3 19207 10,0007%
4 19196 9.9950%
5 19168 9.9804%
6 19207 10,0007%
7 19235 10.0153%
8 19239 10.0174%
9 19187 9.9903%
``````

Asymptotic – solve or approximate recurrence relationships for number sequences

There may be times when you encounter a strange recurrence like this:
$$T (n) = begin {cases} c & n <7 \ 2T left ( frac {n} {5} right) + 4T left ( frac {n} {7} right) + cn & n geq 7 end {cases}$$
If you are like me, you will realize that you can not use the Master Theorem and then you will think: "hmmm … maybe a recurrence tree analysis could work". Then you would realize that the tree begins to become very fast. After some searches on the Internet, you will see that the Akra-Bazzi method will work! Then you start to see it and you realize that you do not really want to do all the calculations. If you have been like me until now, you will love knowing that there is an easier way.

Leave $$c$$ Y $$k$$ Be positive constants.

So, let's go $${a_1, a_2, ldots, a_k }$$ be positive constants such that $$sum_1 ^ k a_i <1$$.

We must also have a recurrence of the form (like our previous example):

begin {align} T (n) & leq c & 0

Claim

Then I claim $$T (n) leq bn$$ where $$b$$ it is a constant (for example, asymptotically linear) and:

$$b = frac {c} {1 – left ( sum_1 ^ k a_i right)}$$

Induction test

Base: $$n < max {a_1 ^ {- 1}, a_2 ^ {- 1}, ldots, a_k ^ {- 1} } implies T (n) leq c

Induction: Suppose it is true for any $$n & # 39; , so, we have

begin {align} T (n) & leq cn + T ( lfloor a_1 n rfloor) + T ( lfloor a_2 n rfloor) + dots + T ( lfloor a_k n rfloor) \ & leq cn + b lfloor a_1 n rfloor + b lfloor a_2 n rfloor + dots + b lfloor a_k n rfloor \ & leq cn + b a_1 n + b a_2 n + dots + b a_k n \ & = cn + bn sum_1 ^ k a_i \[0.5em] & = frac {cn – cn sum_1 ^ k a_i} {1 – left ( sum_1 ^ k a_i right)} + frac {cn sum_1 ^ k a_i} {1 – left ( sum_1 ^ k a_i right)} \[0.5em] & = frac {cn} {1 – left ( sum_1 ^ k a_i right)} \ & = bn & square end {align}

Then we have $$T (n) leq bn implies T (n) = O (n)$$.

Example

$$T (n) = begin {cases} c & n <7 \ 2T left ( frac {n} {5} right) + 4T left ( frac {n} {7} right) + cn & n geq 7 end {cases}$$
First we verify the coefficients within the sum of recursive calls to less than one:
begin {align} 1 &> sum_1 ^ k a_i \ & = frac {1} {5} + frac {1} {5} + frac {1} {7} + frac {1} {7} + frac {1} {7} + frac { 1} {7} \[0.5em] & = frac {2} {5} + frac {4} {7} \[0.5em] & = frac {34} {35} end {align}

Then we verify that the base case is less than the maximum of the inverses of the coefficients:
begin {align} n & < max {a_1 ^ {- 1}, a_2 ^ {- 1}, ldots, a_k ^ {- 1} } \ & = max {5, 5, 7, 7, 7, 7 } \ & = 7 end {align}

With these conditions fulfilled, we know $$T (n) leq bn$$ where $$b$$ is a constant equal to:
begin {align} b & = frac {c} {1 – left ( sum_1 ^ k a_i right)} \[0.5em] & = frac {c} {1 – frac {34} {35}} \[0.5em] & = 35c end {align}
That's why we have:
begin {align} T (n) and ≤ 35cn \ land; T (n) and geq cn \ therefore, T (n) & = Theta (n) end {align}

In the same way we can prove a limit for when. $$sum_1 ^ k = 1$$. The test will follow much of the same format:

Leave $$c$$ Y $$k$$ be positive constants such that $$k> 1$$.

So, let's go $${a_1, a_2, ldots, a_k }$$ be positive constants such that $$sum_1 ^ k a_i = 1$$.

We must also have a recurrence of the form (like our previous example):

begin {align} T (n) & leq c & 0

Claim

Then I claim $$T (n) leq n log_k n + beta n$$ (We choose $$log$$ base $$k$$ why $$k$$ will be the branch factor of the recursion tree) where $$alpha$$ Y $$beta$$ they are constants (for example, asymptotically linear) such that:

$$beta = c$$
Y
$$alpha = frac {c} { sum_1 ^ k a_i log_k a_i ^ {- 1}}$$

Induction test

Base: $$n < max {a_1 ^ {- 1}, a_2 ^ {- 1}, ldots, a_k ^ {- 1} } implies T (n) leq c = beta < alpha n log_k n + beta n$$

Induction: Suppose it is true for any $$n & # 39; , so, we have

begin {align} T (n) & leq cn + T ( lfloor a_1 n rfloor) + T ( lfloor a_2 n rfloor) + dots + T ( lfloor a_k n rfloor) \ & leq cn + sum_1 ^ k ( alpha a_i n log_k a_i n + beta a_i n) \ & = cn + alpha n sum_1 ^ k (a_i log_k a_i n) + beta n sum_1 ^ k a_i \ & = cn + n sum_1 ^ k left (a_i log_k frac {n} {a_i ^ {- 1}} right) + beta n \ & = cn + alpha n sum_1 ^ k (a_i ( log_k n – log_k a_i ^ {- 1})) + beta n \ & = cn + alpha n sum_1 ^ k a_i log_k n – n sum_1 ^ k a_i log_k a_i ^ {- 1} + beta n \ & = n sum_1 ^ k a_i log_k n + beta n \ & = n log_k n + beta n & square end {align}

Then we have $$T (n) leq n log_k n + beta n implies T (n) = O (n log n)$$.

Example

Let's modify that previous example that we use only a little:
$$T (n) = begin {cases} c & n <35 \ 2T left ( frac {n} {5} right) + 4T left ( frac {n} {7} right) + T left ( frac {n} {35} right) + cn & n geq 35 end {cases}$$

First we verify the coefficients within the sum of recursive calls to one:
begin {align} 1 & = sum_1 ^ k a_i \ & = frac {1} {5} + frac {1} {5} + frac {1} {7} + frac {1} {7} + frac {1} {7} + frac { 1} {7} + frac {1} {35} \[0.5em] & = frac {2} {5} + frac {4} {7} + frac {1} {35} \[0.5em] & = frac {35} {35} end {align}

Then we verify that the base case is less than the maximum of the inverses of the coefficients:
begin {align} n & < max {a_1 ^ {- 1}, a_2 ^ {- 1}, ldots, a_k ^ {- 1} } \ & = max {5, 5, 7, 7, 7, 7, 35 } \ & = 35 end {align}

With these conditions fulfilled, we know $$T (n) leq n log n + beta n$$ where $$beta = c$$ Y $$alpha$$ is a constant equal to:
begin {align} b & = frac {c} { sum_1 ^ k a_i log_k a_i ^ {- 1}} \[0.5em] & = frac {c} { frac {2 log_7 5} {5} + frac {4 log_7 7} {7} + frac { log_7 35} {35}} \[0.5em] & approx 1.048c end {align}
That's why we have:
begin {align} T (n) & 1.048cn log_7 n + cn \ therefore, T (n) & = O (n log n) end {align}

functions – Change of Woocommerce flat rate every n number of items

I found a semi-functional solution to my problem in this response. WooCommerce: Flat shipping rate based on X quantity steps? But this counts the total amount of items in the cart that does not work at all because if the customer adds a small item that can be packaged and this item carries the total cart items above the threshold, it causes the shipment to double. . I need the submission to be duplicated ONLY when a specific class (that is, a large shipping class) exceeds the threshold. Here are some examples of what I need.

2 types of products on the site.

• Shirt (only up to 3 can be sent in one package) – rated with "large shipping class"
• Ring (You can send many of them in one package)

Because I can add the rings to the shirt package if a customer bought a combination of these two products, I set the shipping rates to charge the largest shipping class (large shipment).

So here are some samples of orders.

• 3 shirts = \$ 8 shipping
• 3 shirts + 6 rings = \$ 8 shipping
• 4 shirts = \$ 16 shipping (doubles every 3 s)
• 4 shirts + 6 rings = \$ 16 (ignore the rings as amount of cart)

This is what the following code does

• 3 shirts = \$ 8 shipping (good)
• 3 shirts + 1 ring = \$ 16 shipping (not good)
• 6 shirts = \$ 16 shipping (good)

Do you see my dilemma? I would like to modify this code below to count the items in a specific shipping class, NOT the cart quantity.

Here is the code

``````add_filter (& # 39; woocommerce_package_rates & # 39 ;,
& # 39; change_shipping_method_rate_based_on_shipping_class_2 & # 39 ;, 11, 2);
function change_shipping_method_rate_based_on_shipping_class_2 (\$ rates, \$ package) {

\$ items_count = WC () -> cart-> get_cart_contents_count (); // Counting items from the cart
\$ items_change = 5; // number of items needed to increase the cost each time
\$ rate_operand = ceil (\$ items_count / \$ items_change); // Operand increase every 5 elements here

foreach (\$ rates as \$ rate_key => \$ rate) {
// Orientation to "flat rate"
if (& # 39; flat_rate & # 39; === \$ rate-> method_id) {
\$ has_taxes = false;

// Set the new cost
\$ fees[\$rate_key]-> cost = \$ rate-> cost * \$ rate_operand;

// Cost of the tax rate (if enabled)
foreach (\$ rates[\$rate_key]-> taxes like \$ key => \$ taxes) {
yes (\$ taxes> 0) {
// New calculated cost of the tax
\$ taxes[\$key] = \$ tax * \$ rate_operand;
\$ has_taxes = true;
}
}
// Establish new tax costs
if (\$ has_taxes)
\$ fees[\$rate_key]-> taxes = \$ taxes;
}
}
returns \$ fees;
}
``````

Any help is appreciated

co.combinatorics – How to count the number of tensors in a finite range field \$ r \$?

To simplify, work on $$mathbb F_2$$ and only consider order-$$3$$ Equilateral tensors. by $$r in mathbb Z> 0$$how many tensors $$mathfrak {T} in mathsf {Ten} _ {n} ^ { otimes 3} ( mathbb F_2)$$ there is a tensor range $$r$$? ($$mathfrak {T}$$ It is Gothic $$T$$.) Here $$mathsf {Ten} _n ^ { otimes 3} ( mathbb F_2)$$ denotes the set of all $$n times n times n$$ tensors on $$mathbb F_2$$. In general, the tensorial range of a tensor. $$mathfrak {T} in mathsf {Ten} _ { ell, m, n} ( mathbb F)$$ is defined as
$$mathrm {trk} ( mathfrak {T}) = min left {r in mathbb Z_ {> 0} colon mathfrak {T} = sum_ {i = 1} ^ r vec {u} otimes vec {v} otimes vec {w} text {for} vec u in mathbb F ^ ell, vec v in mathbb F ^ m, vec w in mathbb F ^ n right }.$$

The same question is easy for matrices about $$mathbb F_2$$ (and in fact about a finite field of any characteristic). Keep in mind that choosing a $$r$$three-dimensional subspace of $$mathbb F_2 ^ n$$ You can think how to choose a range $$r$$ size matrix $$n times k$$ for some $$n ge k ge r$$ (for the current purpose, take $$k = n$$), module picking up a $$k times r$$ rank array $$r$$.
$$# r text {-dim subspaces} = frac { # n times k text {rank arrays} r} { # k times r text {rank arrays} r}.$$

The number of $$r$$The three-dimensional subspaces are given by the famous Gaussian binomial coefficient. $$begin {bmatrix} n \ r end {bmatrix} _2$$. The full column rank number $$k times r$$ matrix$$k> r$$) can be obtained by sequentially selecting its columns so that the $$i$$-the column is linearly independent of the first $$i-1$$ columns This gives $$prod_ {i = 0} ^ {r-1} (2 ^ k-2 ^ i)$$. Hence the rank number$$r$$ $$n times k$$ matrices is $$begin {bmatrix} n \ r end {bmatrix} _2 cdot prod_ {i = 0} ^ {r-1} (2 ^ k-2 ^ i) = prod_ {i = 0} ^ {r-1} frac {(2 ^ n-2 ^ i) (2 ^ k-2 ^ i)} {2 ^ r-2 ^ i}.$$

I do not see how to apply such an idea to the tensors. On the one hand, we can think that a tensor generates a vector space of matrices. Some people call it cutting space of the tensioner (see page 2 of this article). However, there does not seem to be a higher order notion of Gaussian order for a subspace of $$mathsf {Mat} _ {n times n} ( mathbb F_2)$$. On the other hand, the tensioners have different directions. That's why I want to say, an order-$$3$$ The tensioner has three directions. We can not select sequential two-dimensional segments, that is, three $$n times n$$ Matrices, and affirm that the tensioning range is bounded in a desired way.

My question is: how can you count the number of $$ell times m times n$$ tensors on $$mathbb F_q$$ of rank $$r$$?

sharepoint online – Find the number of days between 2 dates

I have a simple list of SharePoint items. Consider this specific spreadsheet for an example

A1: (Last date not assigned) contains a date.
B1: (State) The state contains a status Available / not available /.
C1: (Idle Days) Idle Days has nothing and should get a result. We have entered manually the last date of Assignment.
I need a result in C1 (Days of inactivity) where the cumulative days of a row with unavailable status should be.
if state = not available for 20 days, the days of inactivity must be 20, in case if the state changes to be available for the next 10 days, the days of inactivity must be 20 and must increase when the state changes to no available.

What I tried:
I tried several methods to work, I tried to create a workflow, I calculated the formulas but I failed.
I have achieved an occurrence in which I created a column called Today with date of current days and subtracted both to obtain the first occurrence of inactive days.

``````= IF (OR (State = "Available", State = "Off"), IF (ISBLANK ([Last UnAssigned Date]),"NULL",([Calculated col]-[Last UnAssigned Date])), 0)
``````

where Calculated col = Today's date

I'm out of logic to continue this.
I appreciate the help

Is the call number needed for support?

Hello,

If a hosting provider has support by email, dial-up and chat 24 hours a day, 7 days a week, is the call number necessary to receive support?

Is it a security problem to accept an invalid credit card number?

I am testing a website that accepts an invalid credit card number for reservations. The interesting thing is that they do CC validation if the currency is USD, not for other currencies. Should I report this as a security problem or will it be the subject of fraud management?

python: How can I convert a large number of xml files to excel?

I'm looking for a way to convert a lot of xml files (more than 7000) to excel or xlsx. The files I have are completely different in structure.

I've been trying to find a Python library, which will allow me to do it, but unfortunately I was not lucky. Can someone help me find a way to do it? I appreciate any help I can provide

python 3x and Pandas How to group a DataFrame by week number?

I have a file in CSV format that contains a column with dates from the 1st. from January 2019 to the date.
Each row can have several times the same date.
I wish to group the data by week number, however for particular reasons the week does not start on Monday but on Thursday and ends on Wednesday.

the objective is that from the date of each line, a column called week is created in which you assign a number that corresponds to the week.

For the year 2019 the first of January is Tuesday, therefore this would be the 6th and the 2nd of January would be the 7th of the week 1.

From Thursday 3 until Wednesday 9 in the week column you should write the number 2 and so on.

What I have done is to decompose the date into several columns

``````date year month day day dia_mb

2019-01-01 2019 01 01 Tuesday 6
2019-01-02 2019 01 02 wednesday 7
2019-01-03 2019 01 03 Thursday 1
``````

From this data, how can I create the new week column in the DataFrame, considering that each time the date increases and the data in the dia_mb column is 1, the week number increases?
real data

calls – Can spammers use the phone number that is called as their fake number?

Originally I bought Tasker several (5?) Years ago to filter calls by:

1) name / number blocked – hang

2) not in my contact list

3) family

4) friends (in my contact list, but not family or professionals)

5) Professionals

6) Previously blocked calls
In recent days I have received calls that sound like family and the number is apparently the same as the number called. Have you experienced that and is there something Tasker can do about it?