« first day (2523 days earlier)      last day (871 days later) » 

2:00 AM
18
Q: How would you have answered to Richard Feynman's challenge?

rtsssReading the autobiography of Richard Feynman, I struck upon the following paragraphs, in which Feynman recall when, as a student of the Princeton physics department, he used to challenge the students of the math department. I challenged them: "I bet there isn't a single theorem that you can tell...

 
 
1 hour later…
3:16 AM
1
Q: fancyhdr long section name overlaps page number

Simon Chemnitz-ThomsenHi I use fancy header but the page number overlaps with the section name in the header. Is there a way to force either a tiny bit smaller text or just allow for longer margins in the header? Thanks. MRE: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \fancyhf{} \fancyhead[...

 
3:46 AM
9
Q: Write a number in overflowed binary

pxegerWe all know how binary conversion works: the sequence of bits $$ b_1, b_2, ..., b_{n-1}, b_n $$ encodes the number $$ b_1 \times 2^{n-1} + b_2 \times 2^{n-2} + ... + b_{n-1} \times 2^1 + b_n \times 2^0 $$ This gives an unambiguous representation when we limit all bits \$ b_i \$ to be only 0 or 1....

 
4:04 AM
3
Q: Removing a element from list when obeying a certain condition

JanWell, I have the following code: Select[PowersRepresentations[n, a, b], DuplicateFreeQ[#] && ! MemberQ[#, 0] &] This code finds PowersRepresentations a makes a list of the solution. Then DuplicateFreeQ[#] and MemberQ[#, 0] remove the ones that contain a duplicate or a $0$. Question: I want to...

 
 
3 hours later…
7:05 AM
6
Q: Can Raku range operator on strings mimic Perl's behaviour?

Nikola BenesIn Perl, the expression "aa" .. "bb" creates a list with the strings: aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb In Raku, however, (at least with Rakudo v2021.08), the same expression creates: aa ab ba bb Even worse, while "12" .. "23" in Perl creates a ...

 
 
5 hours later…
12:35 PM
6
Q: How to efficiently find the index of a value in a sorted array?

PatrickI have a sorted array of values and a single value like so: x <- c(1.0, 3.45, 5.23, 7.3, 12.5, 23.45) v <- 6.45 I can find the index of the value after which v would be inserted into x while maintaining the sorting order: max(which(x <= v)) [1] 3 Nice and compact code but I have the gut feeling...

 
 
6 hours later…
6:16 PM
2
Q: A density one problem for diophantine equations

TheStudentI read that the set of integers that can be written in the form $$n = a^2 + b^4 + c^6$$ is of zero density, since the sum of inverses of exponents $1/2+1/4+1/6$ is less than $1$. I do not understand the argument, is there a probabilistic/density way of seeing/writing this?

 

« first day (2523 days earlier)      last day (871 days later) »