Worth noting it doesn't matter what you actually do with the identifiers since as soon as they're evaluated the work is done. Maybe something like mov- rbx, rsi would look nicer
Basic stats question. I have 100,000 items each of which is in one of five categories and each item has a price. I want to estimate the proportion of cost for each category. If I sample 25 at random and just use the price of the items in that sample, how should do the random sample?
Should the probabilities be weighted by the price of each item?
You're overthinking it, if you have N items from a category in your random sample, the expected price of that category as a fraction of the total is just the sum of prices of those N items divided by the total in your sample
You could also approach it as the expected average cost of an item in that category multiplied by the expected percentage of the items that are in that category, which should give you the exact same result
No matter how you sample your data or account for things, it's always possible there's some wild outlier that makes your predictions totally inaccurate
I guess it'd depend on how much information you have. Like, at some point you need enough information to be able to sample well that you could just use a better approach than random sampling, or more than 25 samples
I guess if there is a large disparity in prices between things and you need the minimum possible number of samples, you'd probably want the number of samples in a subgroup of items to be roughly proportional to the sum of their costs
From the chat rules: "Sometimes, there isn't anybody talking in chat. That's perfectly fine. Don't send messages just because the room is quiet." See here: cgcc-se.github.io/chatiquette
(This is OEIS A057531.)
Your task
Given a positive integer, \$n\$, find the \$n\$th number where the digit sum equals the number of factors
Explanation
For example, let's take 22:
Its factors are \$[1, 2, 11, 22]\$ (length: 4).
Its digit sum is 4.
This means that it is a number where the digit su...