« first day (2044 days earlier)      last day (1350 days later) » 

1:00 AM
10
Q: How to make a for loop variable const with the exception of the increment statement?

jhourbackConsider a standard for loop: for (int i = 0; i < 10; ++i) { // do something with i } I want to prevent the variable i from being modified in the body of the for loop. However, I cannot declare i as const as this makes the increment statement invalid. Is there a way to make i a const variabl...

 
 
1 hour later…
2:30 AM
4
Q: Natural density of set of numbers not divisible by any prime in an infinite subset

beanSuppose $S$ is a subset of the primes with natural density $0 < \alpha < 1$ within the primes. If $$D(X) := \{n \leq X \mid p \not \mid n \text{ for all } p \in S \}$$ (so $D(X)$ is numbers at most $X$ not divisible by any $p \in S$), then is there a nice form for the asymptotic value of $D(X)$ a...

 
 
7 hours later…
9:00 AM
5
Q: Rational characters of a number field are powers of norm

BreakfastisreadyConsider a number field $K/\mathbb{Q}$ and the embedding of $K^* \hookrightarrow GL_n(\mathbb{Q})$. This is the set of rational points of a $\mathbb{Q}$-algebraic group $G \subseteq GL_n(\mathbb{C})$. Then is it true that any $\mathbb{Q}$-characters of $G$ will look like $g \mapsto \det(g)^k$ for...

 
 
3 hours later…
12:00 PM
6
Q: Any way to determine if a finite multiset of natural numbers can be combined via addition or subtraction to form zero?

pua666Disclaimer: I studied math at college, but it was decades ago; my current level is "idiot," and my question is probably about a well-known problem. However, I've tried extensive web searches, to no avail. Any help is appreciated! For a game I'm developing, I need to generate/evaluate small multis...

 
 
3 hours later…
2:48 PM
2
Q: Eigenvalues of the complement of a graph

GA316Let $A$ be the adjacency matrix of a graph $G$ and let $\widetilde A$ be the adjacency matrix of the complement of the graph $G$. is there any relation between the eigenvalues of $A + \widetilde A$ and the eigenvalues of $A$ and $\widetilde A$? Also, do $A$ and $\widetilde A$ have the same set of...

 
3:18 PM
6
Q: Filter only unique values from an array of object javascript

Bhart SupriyaI have an array of objects i want to filter only the unique style and is not repeated . const arrayOfObj = [ {name:'a' , style:'p'} , {name:'b' , style:'q'} , {name:'c' , style:'q'}] result expected : [ {name:'a' , style:'p'}]

 
4:18 PM
2
Q: Solve quadratic equation mod n

Ankit KumarFind all solutions of the congruence $$3x^2 + 5x + 2 \equiv 0 \pmod{2537}$$ My approach: Solve $3x^2 + 5x + 2 = 0$. The solutions are $-1, \frac{-4}{6}$. $6^{-1}\pmod{2537} = 423.$ $-4\cdot 423 \equiv 845 \pmod{2537}$ Hence the answer should be $-1 + 2537k, 845 + 2537k, k \in Z$. Is this correct?

 
 
2 hours later…
6:03 PM
ahem
 
6:48 PM
9
Q: How can you quickly compute the integer logarithm for any base?

J. SchultkeHow can I quickly compute the integer logarithm for any base, not just base 10? This question has a really efficient solution for base 10 but I don't understand how I can generalize that to other bases.

 

« first day (2044 days earlier)      last day (1350 days later) »