Why this ugly looking formula to calculate ‘target’ from ‘nBits’ in block header: target = coefficient * 256**(exponent-3)

Why this ugly looking formula to calculate ‘target’ from ‘nBits’ in block header: target = coefficient * 256**(exponent-3).

enter image description here

Why not? : target = coefficient * 256**(exponent). What is the need of subtracting 3. All we need is to be able to generate 256 bit long number and enough precision (which we already have with 3 bytes dedicated for coefficient)

Even better, why not? : target = coefficient * 2**(exponent)

co.combinatorics – Random gaussian binomial coefficient

Pick a lattice path which starts at $(0,0)$ and finishes at $(X,Y)$ in
$(0,X) times (0,Y) capmathbb{Z}^2$,
and
consider the area $A$ enclosed beneath. If $X,Y$ are independent Poisson random
variables, what is the p.g.f. of the area $A$?

To explain further, consider the $q$-analogue of the binomial coefficient, known as the Gaussian binomial coefficient:

$${X + Y choose Y}_{q} = 1 +q + dots + q^{XY}$$

but where we let $X,Y$ be independent Poisson random variables with mean $lambda_{X}$ and $lambda_{Y}$:

$$X sim text{Poisson}(lambda_{X}) \
Y sim text{Poisson}(lambda_{Y})$$

We could write

$$f(lambda_X,lambda_Y,q)=sum_{x=0}^{infty} sum_{y=0}^{infty} left(frac{e^{-lambda_X}lambda_X^x}{x!}frac{e^{-lambda_Y}lambda_Y^y}{y!}left(frac{1}{{x+ychoose y}}{x + y choose y}_{q}right)right) \ ,,,=
e^{-(lambda_X +lambda_Y )}sum_{x=0}^{infty} sum_{y=0}^{infty} frac{lambda_X^xlambda_Y^y}{(x+y)!}{x + y choose y}_{q}$$

This gives the p.g.f. of the area under a lattice path in $(0,X) times (0,Y) cap mathbb{Z}^2$ from $(0,0)$ to $(X,Y)$ i.e. a lattice path in a random rectangle, from $(0,0)$ to $(X,Y)$, with Poisson dimensions $X times Y$.

What can be said about this random area? It is not just a random lattice path and the p.g.f. of its enclosed area, but now, the lattice it traverses is random.

vba – User-defined function for estimating coefficient of performance

I am using hourly weather data to estimate performance of commercial refrigeration systems under various parameters. The formula for estimating co-efficient of performance (COP) of these systems is repeated for each hour.

I defined a formula to do this calculation:

Public Function estimatedCOP(dischargeTemp As Double, suctionTemp As Double)

Dim a As Double, b As Double, c As Double, d As Double, e As Double, f As Double

a = 9.12808037
b = 0.15059952
c = 0.00043975
d = -0.09029313
e = 0.00024061
f = -0.00099278

estimatedCOP = a + b * suctionTemp + c * suctionTemp * suctionTemp + _
    d * dischargeTemp + e * dischargeTemp * dischargeTemp + _
    f * suctionTemp * dischargeTemp

End Function

This gives the expected result, but takes a long time to calculate and update (as it’s repeated ~10,000 times). How can I improve the performance of this function?

Bayesian Statistics – Posterior distribution of the logistic regression coefficient

I have a binary logistic regression with the following characteristics

Consider the logistic regression for binary data Yi ∈ {0,1} and the covariate vector xi = (xi, 1, xi, 2, …, xi, p). Assuming logistic regression, the sample distribution is Yi (1). We assume a normal prior for βj for j = 1, …, n as in (2) and βjs are independent of each other. (μj, σj2) are previous parameters and must be specified.

Prob (Yi = 1 | β) = exp (x⊤i β) / 1 + exp (x⊤i β)
βj ∼N (μj, σj2) (2)

I need to find the back distribution for β, i.e. H. P (β | y, μ1, …, μp, σ12, …, σp2).

at.algebraic topology – when the local coefficient system in the Leray-Serre spectral sequence is simple

To let $ F to E to B $ a vibration and $ {E_ {r} ^ { ast, ast}, d_ {r} } $ the Leray-Serre spectral sequence converges to $ H ^ { ast} (E; R), $ so that
$$ E_ {2} ^ {p, q} = H ^ {p} (B; mathcal {H} ^ {q} (F; R)) $$
the cohomology of $ B $ with local coefficients in the fiber cohomology $ F. $ We know that when the action of $ pi_ {1} (B) $ induced by vibration on the cohomology of $ F $ is trivial, then the system of local coefficients is simple. My question is: there is something to say (provided that $ R = mathbb {Z} _ {2} $ and $ pi_ {1} (B) = mathbb {Z} _ {2} $) If the action is trivial except for ONE element in cohomology? More specifically, there is only one element $ c in H ^ {1} (F; R) $ so that $ mu (g, c) = gc neq c, $ to the $ g in mathbb {Z} _ {2} = langle g rangle $when $ mu: pi_ {1} (B) times H ^ { ast} (F) to H ^ { ast} (F) $ denotes the induced effect.

Google Sheets – Calculate the performance trend line coefficient for the array over a period of time

I have a database with 3 columns (code, week, value), where code is project code, week is the date of the beginning of the week and value is the aggregate amount for the respective week.

For each project, I have to determine a performance trend line coefficient for a certain period (e.g. the last 4 weeks since the beginning of 2020).

INDEX(LINEST(LN(Values),LN({1,..,N})),1)

where N is the number of weeks from the start (e.g. 4 for the last 4 weeks)

My problems started with trying to do this for a number of projects.

I only found a solution for one project (example for the last 4 weeks, others in the file), but there is a way to do it for all projects.

=IFERROR(INDEX(
LINEST(
LN(
VLOOKUP(
SORT(
LARGE(UNIQUE(FILTER(DB!$B:$B,DB!$A:$A = A2)),
SEQUENCE(4,1,2,1)),1,true),
QUERY({DB!$A:$C},
"Select Col2, SUM(Col3)
Where Col1 ='"&A2&"'
Group by Col2
Order by Col2
Label SUM(Col3) ''",0),
2,0)
),
LN(
SEQUENCE(4,1,2,1)
)),
1),0)

Here is Test_Doc,
Thank you in advance.

Classical analysis and odes – Limitation of a Fourier coefficient of a non-negative periodic function with respect to its $ L ^ 2 $ norm

This question is motivated by the earlier MO question: Show that $ ( sum_ {k = 1} ^ {n} x_ {k} cos {k}) ^ 2 + ( sum_ {k = 1} ^ {n}) x_ {k} sin {k}) ^ 2 le (2+ frac {n} {4}) sum_ {k = 1} ^ {n} x ^ 2_ {k} $.
It is an adjusted asymptotic version of this question.

To let $ f $ be a non-negative function, periodically with period $ 1 $and square can be integrated $ { Bbb R} / { Bbb Z} $. Is it true that
$$
| { widehat f} (1) | ^ 2 = Big | int_0 ^ 1 f (x) e ^ {- 2 pi ix} dx Big | ^ 2 le frac 14 int_0 ^ 1 f (x) ^ 2 dx ?
$$

For example, equality is achieved when $ f (x) = max (0, cos (2 pi x)) $.

Note that $ | widehat f (1) | = | widehat f (-1) | $ and since $ f $ is not negative $ | widehat f (1) | le widehat f (0) $. Therefore
$$
int_0 ^ 1 f (x) ^ 2 dx = sum_n | widehat f (n) | ^ 2 ge 3 | widehat f (1) | ^ 2,
$$

so that the estimate applies $ 1/3 $ instead of $ 1/4 $. There is a lot of scope to improve this argument, and with a more careful application of Bessel's inequality I could get the constant $ 1/4 + 1/4 pi $. But the claimed inequality looks very clean, and I wonder if (i) it is true! (Ii) is known in a certain context and (iii) (hopefully) has elegant evidence?

Geometry – problem with equating the coefficient of the elliptic curve

To let, $ E: = y ^ 2 = x ^ 3 + Ax + B $ an elliptic curve, 2 points $ P, -Q $ on $ E $ so that $ 2P = -Q $, we can write

$$ y ^ 2-x ^ 3 + Ax + B = (x – e_1) (x – e_2) ^ 2 = 0 $$
Where, $ e_1 = x (Q), e_2 = x (P) $ a double root. So,
$ y = m (x-x (Q)) + y (Q) $, Here $ y $ is the line that goes thoroughly $ P, Q $, and $ m $ is the slope.

$$ (x – e_1) (x ^ 2 – 2xe_2 + e_2 ^ 2) $$
$$ = (x ^ 3 – 2x ^ 2e_2 + xe_2 ^ 2) – (x ^ 2e_1 – 2xe_1e_2 + e_1e_2 ^ 2) $$
$$ = x ^ 3 – 2x ^ 2e_2 + xe_2 ^ 2-x ^ 2e_1 + 2xe_1e_2-e_1e_2 ^ 2 $$
$$ = x ^ 3 + x ^ 2 (-1) (2e_2 + e_1) + x (e_2 ^ 2 + 2e_1e_2) + (- 1) e_1e_2 ^ 2 $$

Of $ y ^ 2-x ^ 3 + Ax + B = 0 $ we get coefficients of $ x ^ 2 $ is $ (- 1) m ^ 2 $, We find the equality coefficient, $ m ^ 2 = (2e_2 + e_1) $,

The problem is, if I simplify both sides and then equate the coefficient, I get the correct coefficient of $ x ^ 2 $ but not for $ x $ (if plug-in value of $ P, Q $, the coefficients of $ x ^ 2 $ just doesn't satisfy $ x $).

What's the problem?

Number theory – Question about the coefficient of the Dirichlet series in relation to $ frac { zeta (s + 2)} { zeta (s)} $

This question concerns the evaluation of $ a (n) $ defined in (1) below, which refers to the Riemann zeta function $ zeta (s) $ as shown in (2) below.


(1) $ quad a (n) = sum limit_ {d | n} frac { mu left ( frac {n} {d} right)} {d ^ 2} = frac {A046970 (n)} {n ^ 2} $

(2) $ quad frac { zeta (s + 2)} { zeta (s)} = sum limit_ {n = 1} ^ infty a (n) n ^ {- s} ,, quad Re (s)> frac {1} {2} quad text {(assuming the Riemann hypothesis)} $


A046970 in formula (1) above is the Dirichlet inverse of the Jordan function $ J_2 (n) $ (A007434) where $ J_k (n) $ is a generalization of the Euler totient function $ phi (n) $ both of which are defined below.


(3) $ quad phi (n) = n prod limit_ {p | n} left (1- frac {1} {p} right) $

(4) $ quad J_k (n) = n ^ k prod limit_ {p | n} left (1- frac {1} {p ^ k} right) $


The following figure shows $ a (n) $ always seems to rate that $ -1 <a (n) <1 $ except for $ n = 1 $ Where $ a (1) = 1 $and there is also a noticeable streaking in the values ​​of $ a (n) $,


Discrete representation of a (n)

Illustration 1): Discrete act of $ a (n) $


Question 1): Can this be proven? $ -1 <a (n) <1 $ for all $ n> 1 $? I checked $ -1 <a (n) <1 $ to the $ 1 <n le 10 ^ 6 $,


Question 2): Is there an explanation for the perceptible streaking in the values ​​of $ a (n) $ in Figure (1), and this stripe pattern continues as $ n to infty $?

Approximation theory – are there good references to the decay rate of the Legendre coefficient?

To let $ P_n: (- 1,1) rightarrow mathbb {R} $ be the $ n $Legendre polynomial. and let
$$ a_n: = int _ {- 1} ^ 1 f (t) P_n (t) , dt $$
for some $ f: (- 1,1) rightarrow mathbb {R} $,

There is good evidence of the decay rate of $ vert a_n vert $? I don't know about this type of problem, but I think there have to be many methods.

From the following similar mathoverflow question: reference for the exponential decay of Legendre coefficients, I found a work. I also found a book by Atkinson on "Spherical Harmonics and Approaches to the Unity Sphere". After reading these references, it appears that the smoothness of $ f $ is a method. But the application in my head is the case when $ f = arccos ^ 2 (t) $what is not smooth enough.

So I wonder if there are other references that explain different methods of calculating the decay rate of $ vert a_n vert $, Especially if there are some techniques that can be used for slippery $ f $, I really want to know.