6.9.1 Top new questions this week

6.9.1.1 Find if there are consecutive 1s in a binary representation of a number
6.9.1.2 Why do some PlotThemes not work with Mesh as expected? What can be done about it?
6.9.1.3 How can I replace a set of Nested For Loops with a Functional Code Alternative?
6.9.1.4 How to construct this matrix in Mathematica
6.9.1.5 Rewriting partitions using exponents
6.9.1.6 What is the difference between a variable and a "slot variable"?
6.9.1.7 Efficiently populate sparse matrix with band structure
6.9.1.1 Find if there are consecutive 1s in a binary representation of a number

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223087

Given a list of numbers in decimal form, what is the most efficient way to determine if there are any consecutive 1s in the binary forms of those numbers? My solution so far: 
 
dim = 3; 
declist =  ... 
[list-manipulation] [performance-tuning] [binary]
 
asked by KHAAAAAAAAN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65587 10 votes
answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 10 votes
6.9.1.2 Why do some PlotThemes not work with Mesh as expected? What can be done about it?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223159

While updating my answer for (189038) I noted that some PlotThemes do not work with Mesh in a meaningful way: 
 
SeedRandom["08.01.2019"]; 
$plotThemes = Map[ToString] @ { Web, Monochrome, Detailed,  ... 
[plotting] [mesh] [plot-themes]
 
asked by gwr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=764 9 votes
answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes
6.9.1.3 How can I replace a set of Nested For Loops with a Functional Code Alternative?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223023

Despite having looked over various posts concerning optimizing nested For loop expressions into a functional programming equivalent I still can not figure out how to actually to do this.  Such  ... 
[performance-tuning] [functional-style] [procedural-programming]
 
asked by Stuart Poss https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35282 8 votes
answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes
6.9.1.4 How to construct this matrix in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222895

I create a symbolic matrix using the following: 
 
mat = ToExpression[Table[StringJoin[{"s", ToString[i], ToString[j]}], {i, 1, d}, {j, 1, d}]] 
 
 
for arbitrary $d$. Notice that for $d=2$, this gives 
 
... 
[functions] [matrix]
 
asked by Sid https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26461 8 votes
answered by Edmund https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19542 6 votes
6.9.1.5 Rewriting partitions using exponents

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222950

I'm looking for a way to re-express a partition given in full form, like 
$\{{2, 2, 1, 1}\}$, into the shortened form $\{2^2, 1^2\}$, i.e. given a partition with repeated entries, count the number of  ... 
[output-formatting] [combinatorics] [partitions]
 
asked by ZeroTheHero https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52937 7 votes
answered by kirma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3056 7 votes
6.9.1.6 What is the difference between a variable and a "slot variable"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222964

Investigating Function[] , I found: 
 
 
 
 
 
What is the difference between using a variable (in the case, $u$) and a "slot variable"? It seems anything can be done with both. Is there something that  ... 
[function-construction] [slot]
 
asked by Billy Rubina https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=603 7 votes
answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 9 votes
6.9.1.7 Efficiently populate sparse matrix with band structure

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222924

I'm trying to efficiently populate elements of a very large (2^20 x 2^20) symmetric matrix with 1s - luckily the matrix is very sparse, <0.1% filling. Further, the matrix has a very well defined  ... 
[matrix] [performance-tuning] [sparse-arrays]
 
asked by KHAAAAAAAAN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65587 7 votes
answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 8 votes