Monday, December 24, 2018

Amusing night in the pub

I dropped into Beer Republic The Grub on Friday night. This is a bar near my station that has a few rotating taps of interesting beers. It's technically an Irish pub. If you look on their website it says so but the guy behind the bad didn't actually know this! Also, there are no Irish people there. Anyway I was there having a quiet beer and reading my book when I remembered the candle my brother had sent as a Christmas gift. It's a pear-scented candle. Knowing that this bar also likes it's whiskey, I showed to the bar man. Various other customers took a whiff too. Then he suggested we light it.

A while later he tells me the place is closing on Jan 30th and breaks out a bottle of Moet Champagne. So now I'm watching my candle through a glass of champagne.

Sitting a bit further up the counter are two Japanese women. One asks if it's an Irish drunking custom to bring a scented candle with you. It is now :)

A while later a guy comes in pretty drunk with a big box of Mr Donuts. He hands it over the counter and the staff put them on plates and it's donut time for everyone.

A while later I got talking a bit more with the 2 ladies. One of them was chatting with a guy she likes. They've been chatting on Line for about a year and she doesn't know if he's into her or not. Jesus, that's some suffering. All their friends know that she into him, nobody knows what he thinks. It's his birthday and she has bought him a small but expensive cake but the way things are going, she's going to eat it home alone tonight. His replies are too cryptic to make anything useful out of but she tries one more time. He's drinking at his home station, 5 minutes away. With a lot of encouragement from me and her friend, she leaves to meet him. I got her friend's Line contact info but there's been no report back to me at least...

I've only been in there about 5 times, this was my first Friday night. I don't know if it's usually this interesting. Makes me sad that this place is closing though.

Saturday, November 10, 2018

Horrible Japanese Advertising - This Time from Dove

I've seen an unskippable 15 second ad on Youtube several times for Dove Men's Care. It really grinds my gears. In the video a man explains that his kids say "I don't want to touch dad's face" because it's too oily. WTF, where could his 4 year old kid have possibly learned this. It's pure bullshit, kids will roll around in any old filth. Then he discovers Dove For Oily Men or whatever it's called, his kids are all over him touching his face now and everyone is happy. Go fuck yourself Dove.

It tops the previous advertising directly targetting insecurities, in that case smelly over-40s men.

BTW, I'm intentionally not linking to any of Dove's crap.

Saturday, November 03, 2018

Let's (not) talk about adjectives in Japanese

TL;DR Japanese doesn't really have adjectives. Everything you think of as an adjective is a verb-phrase (a tiny sentence inside the real sentence). This is great because you can put any verb-phrase in front of a noun to add simple or extremely complex descriptions to the noun. That's the only way to add descriptions to nouns in Japanese grammar. Thinking of it like gets rid of all of the exceptions and weird coincidences and reduces the number of rules you have to learn.

Japanese teachers and text books usually talk about 2 types of adjectives in Japanese but I find this confusing and more complicated than it needs to be.

First, let's start with the advanced stuff. How do you say something complicated like "a person that is riding a horse"? Now for an english speaker, this sentence doesn't have any adjectices, so why is it relevent? It's relevant because it's still a noun and something that describes the noun. It's the most general case, you can use it for the simplest and the most complex descriptions. You can say "a red person" in English but you can also switch that to "a person that is red". Anything you can do with an adjective you can do with "... that is ...". So, how do you say "a person that is riding a horse" in Japanese? It's 「馬に乗る人」. You just take the verb-phrase 「馬に乗る」 - "riding a horse" and put it in front of the noun. In English this is a bit like "a riding-a-horse person". You can do more complex things in English like "a riding-a-horse-and-eating-ice-cream person" but it gets weird and you'll probably want to switch to "a person that is riding a horse and eating ice cream". In Japanese, there's only one way it's 「馬に乗ってアイスを食べる人」. You can put the most complex verb-phrase in front of the noun and that's just how Japanese works.

So for Japanese you describe nouns by putting a verb-phrase in front but this is "advanced" grammar. Before textbooks teach you that, they will teach about い and な adjectives and you will be confused but really, both of these are just verb-phrases that go in front of a noun. I think they only get called adjectives because somebody thought "first we teach nouns, then verbs, then adjectives, then adverbs, then blah blah ... and eventually verb-phrase+noun". It's also partly because they always teach です before they teach だ to be polite. The result is the horrible confusion that is い and な adjectives.

First problem, い-adjectives can be in the past tense. WTF? How can an adjective have a tense? In fact い adjectives behave exactly like any verb in Japanese, you can make a sentence with them - 「道路が広い」 - "the road is wide". That's valid sentence. There's no other verb there. It's not like leaving out the subject in Japanese. The subject is often omitted in Japense but you can always put it back in if you like and the sentence is still correct. There is no missing verb you can put back in to 「道路が広い」, that's the whole sentence right there. You can put a です at the end to make it polite but if you were creating an impolite sentence, you couldn't put a だ in. You can even put it in the past tense - 「道路が広かった」 - "the road was wide" by conjugating the... adjective? no the verb. The verb is "to be wide" which is a bit weird for English speakers but it's not awful.

So, if it works exactly like a verb, it's a verb! If you insist that it's an adjective then you have to also explain that adjectives in Japanese have a past tense and a て form and also that Japanese has sentences with no verb sometimes.

Now let's see how it's usually introduced, as an い adjective. 「広い道路」 - "wide road". If you think of 広い as a verb then this is just a verb-phrase in front of a noun, that's not a new rule, you already knew that. 「広かった道路」 - "road that was wide" is quite natural now. It's definitely a bit weird that Japanese has a verb "to be wide" but that's a lot less weird than having adjectives with tense. "is-wide road" and "was-wide road" are the direct translations into English. You wouldn't say them but they kind of work.

So next is な adjectives. It turns out that な is actually だ in disguise. It gets pronounced な when you say it before a noun. Try saying だ instead, it's a bit awkward, so maybe that's why it morphed. So 「きれいな人」 - "a beautiful person" is really 「きれい人」and this becomes really obvious when you want to say "person that was beautiful" because it's 「きれいだった人」. Look at that, だった is the past tense of だ, that's not a new rule either! 「きれいだ」- "it's beautiful", 「きれいだった」 - "it was beautiful". So all we have here is just another verb-phrase in front of a noun. "an is-beautiful person", "a was-beautiful person" are the direct translations into English, again weird but they make sense.

So if I was teaching Japanese I would say that everything about adjectives and decribing nouns in Japanese can be summed up as

  1. put any verb-phrase in front of a noun to add more detail, e.g. "an X that Y" in English is just 「Y X」 in Japanese.
  2. there is a verb "to be wide" in Japanese and "to be blue" and lots more and they all end in い (and they behave just like every other verb in Japanese)
  3. when it comes before a noun, だ turns into な

Compare that with

  1. There are 2 types of adjectives in Japanese, い and な adjectives.
  2. Adjectives in Japanese have tenses... seriously
    1. the past tense of an い adjective is made by blah blah (oh weird, that's a lot like verbs but let's pretend we didn't notice that)
    2. the past tense of a な adjective is made by blah blah (oh weird, that's the same as だ but we didn't learn だ yet because that's not polite!)
  3. Adjectives in Japanese also have a て form, just like verbs.
  4. In fact, pretty much anything else about verbs applies to adjectives, negation etc.
  5. Unlike English, not all sentences in Japanese have a verb, sometimes they just end in an い adjective.
  6. If you want to make a sentence out of a な adjective, you just replace な with だ unless (or drop it completely if you're using です)
  7. put any verb-phrase in front of a noun to add more detail, e.g. "an X that Y" in English is just 「Y X」 in Japanese.

My way is just 3 very simple points. The standard way is so much more complicated, full of exceptions and coincidences that you're supposed to ignore.

Sunday, October 28, 2018

Impressive Logo

Spotted a very impressive logo today in Sangenjaya. It's Mizumoto Ladies' Clinic and they have made an M that captures the female reproductive system in disturbing detail!


Friday, October 26, 2018

Halloween's terrifying turnips

I would just like to remind the world that Halloween is an Irish tradition (and also Scotland/Wales - basically Celtic) There were no pumpkins in that part of the world and in fact it was traditional to carve a jack-o-lantern from a turnip, like the one in the photo here, which would eat and shit out any of these cutesy orange pumpkins I keep seeing all over the place.
That photo is from Wikipedia's Halloween page which says it's from the Museum of Country Life. Who's up for a bit turnip carving this Halloween? I don't know where to get one in Japan.

Saturday, May 12, 2018

Horrible advertising

What it says is "Since you turned 40, don't you feel like your smell has changed? Lucido fights against over-40 smell". Go fuck yourself Lucido. I don't need your shitty product for a made-up problem. Also fuck you Facebook while I'm at it for showing me this every day.

Japan is full of cosmetic and deodorant advertising, preying on people's insecurities, I particularly disliked one for a shampoo that promised to get right down into your pores and remove all the oil. WTF? Your body is not making that oil for shits and giggles (shits and giggles each have their own dedicated machinery) getting rid of all of it should not be your goal. Of course if you do that, you'll need some other product to deal with your dry hair or whatever. Every country has this but I feel like Japan just has way more of it.

Saturday, January 06, 2018

Introducing the Yollar

Seems like new currencies are everywhere these days. This one isn't new, it's a just a new name for something that already exists. Recently I've been using 1 Yollar to mean 100 Japanese Yen. If you moved to Japan from the US or the EU, you probably still think about money in terms of something around the value of a USD or EUR and are a bit confused by dealing with so many zeros when talking about Yen (quick now, is 500,000 Yen for a car cheap or expensive?). Do you sometimes say "60 dollars" when something costs 6000 Yen? Does the person listening know whether you actually meant exactly 6000 Yen or whether it was actually 60 USD and so need to multiply by 110 to get Yen. The Yollar removes any confusion, 60 Yollars is 6000 Yen.

This unit was already floating around in your head, you just didn't have a name for it. Now you do.

Saturday, November 11, 2017

Adding remote-control keys to a Keygal door

My house has remote control keys (as well as regular keys). It's very convenient, I have no idea how secure it is. Anyway, I lost one of the keys and bought a new one and had some trouble following the Japanese instructions. I got it eventually, so here's the procedure.

First note, you can't just add a key, you have to wipe the system and add all of your keys back in one go.

The original Japanese docs are here and here. That'll make it clear how to get access to the register/clear button for you lock.

So, here's the procedure, I'm not exactly sure that all parts are necessary but this worked (you might want someone else around to do the press-and-hold part. Apparently you have 20s to do it all. I don't know how strict that is.

  1. Put one of the metal keys in your pocket - you wouldn't want to lock yourself out!
  2. Open the door.
  3. Twist both the top and bottom cyclinder closed and then open again. I suspect this isn't necessary but it's no harm.
  4. Remove the cover at the top of the top cylinder.
  5. Press the register/clear button for 5 seconds, until it makes a long beep sound. You have cleared all the keys off the lock, none of your remove control keys work now.
  6. Press and hold the register/clear button, keep holding it while you do the next steps.
  7. Take your first key and press lock then unlock then lock and unlock again. You should hear short beeps for these presses (I'm not 100% sure that I heard a beep for each one but definitely for the first lock press).
  8. Now take each of your next keys and press lock then unlock. Unlike the first key, you only need to do it once per key.
  9. Let go of your register/clear button.
  10. Put the cover back on the top of the top lock.

You can watch this video too. It's for a different model but gives a clear idea of the registration method.

Friday, August 25, 2017

Women in tech and James Damore's diversity memo

I work for Google, the following is purely my personal opinion.

I wanted to say something about James Damore’s now-famous diversity memo. I didn’t post sooner as I haven’t had much free time and it requires care. It requires care because it's very easy to read his doc as an innocent attempt to have a discussion and to see him as the victim of a liberal conspiracy. I don't believe either of those to be true. Luckily many people have already written a great deal that I agree with and I will be mostly just refer to them.

There are a bunch of issues.

Is his science correct?

I’d guess some of it is but he has been so selective that it doesn’t really matter. See [Sadedin], [Giglio] (very detailed) and [Economist] who talk about specific studies and also the cherry picking.

Is his argument valid?

I can't find an actual argument in his doc, he just lists off some alleged differences and states that they may be factors in the gender gap. He makes no effort to show that they really are. There is no argument that biology is more important than society or that it's even significant at all. His doc doesn't prove that the current 80-20 split in tech is natural. His arguments also justify the 100-0 split in science in 1800. We have had 1000s of years of institutionalized sexism and while he suggests other causes, he provides no evidence or argument that these other causes matter in comparison to the well-known social problems.

Wasn’t he talking about preference, not ability?

He writes, “I’m simply stating that the distribution of preferences and abilities of men and women differ in part due to biological causes and that these differences may explain why we don’t see equal representation of women in tech”. So he was definitely talking about ability, although he did a good job making it seem like he wasn’t.

In my mind, preference and ability are highly related. Much of my ability comes from my preference and vice-versa. It's easier to study something you like and you'll probably like things that you're good at. If I was hiring for a job, given two candidates of equal ability, I would choose the one who likes the subject. Talking about preference just seems like a coded way of talking about ability while maintaining plausible deniability.

Wasn’t he talking about populations, not attacking the women who were already hired by Google?

Negatively stereotyping a group is an attack on every individual in that group, including those who have already proven themselves to be "exceptions". If the stereotype is believed, then every woman has to prove that they are an exception to every new employer, manager, colleague etc, meanwhile men get a free pass. Allowing these ideas to stand unchallenged makes life harder for every woman interested in tech. Propagating these ideas is an attack on every woman interested in tech.

Was he starting a discussion in good-faith?

I don’t think so. The doc does a great job of sounding reasonable but implies things (e.g. that biology is a significant factor) that it really does not justify (see above). Also you would have to be a fool to think that a doc like that would lead to a productive discussion. It is full of direct and indirect attacks on women’s ability and right to work in tech. There’s no need to do any of that if you just want to raise issues with diversity programs. Interestingly, according to [Gable Brown] he comes from a highschool where this kind of trolling-disguised-as-reasonable-argument was widely understood. It was practiced as a sport by some. In their forums, she says that they are discussing his use of well known techniques. It seems unlikely that he would then accidentally deploy those techniques.

Even if the memo raised some legitimate points, it is fundamentally tainted. If you drop a turd into a swimming pool, don't be surprised when nobody wants to race you and you're kicked out of the pool. It doesn't mean you're an awesome swimmer and everyone is afraid to race you. In this case, the pool was about 90% turd.

Can’t we just have this honest conversation?

I think you should be tied up in a sack and thrown in the river. I’m sure neither of us are 100% right but I had a sack tailored to fit you. Maybe you should at least be tied up in it, we can see what happens after that. Anyway, can't we just have this honest conversation? Just have it again and again until hopefully some day you get into the sack? Is this some kind of ideological echo chamber where we can’t have an open, honest discussion about whether I should tie you up in a sack and throw you in the river? Free speech! I’m being oppressed!

As [Danger] points out, some ideas (like “this group of employees is inherently less fit for their role”) cause harm just by being debated openly. Just having the conversation is an existential threat to that group. That doesn't mean they can never be debated but you have to take responsibility for the harm if you do.

Is Google a place where people can express unpopular or conservative opinions safely?

I think so, but I guess I’m part of the dominant ideology. Expressing any view carelessly in Google is a bad idea. There are experts in all sorts of fields who will pop up and correct you. There is definitely a liberal bias but as Stephen Colbert said, reality has a well-known liberal bias. Specifically, reality is constantly changing, it doesn’t care how things used to be, and it doesn’t care what some book or some old white guy says. This makes conservative opinions particularly tricky. They are, by definition, about keeping things how they used to be. They are often justified by appeals to how things used to be, a book or some old white guy. That's really not going to help you at Google.

Specifically, if you want to express the view that some group of people should continue to have a shitty time just like they had in the good old days or that some other group of people should continue to enjoy privilege they haven’t earned, then you’re going to have a bad time. You are not simply offending people, you are attacking them. The spread of your opinion causes direct harm to them in their work and personal lives.

If you haven't been challenged before you may not understand the very real impact of your words and the negative reaction may feel like an attack. You're not being attacked (hopefully), you're just being asked to try to see things from a perspective you would not normally. This can be very uncomfortable. Accepting this perspective may require admitting you've been a jerk for years (hopefully without knowing it). You may have to admit that you have benefited from an unearned privilege (and try to stop taking advantage of it going forward). Many people, even in good jobs, feel like they are barely scraping by. Impostor syndrome is common. Giving up some advantages will feel quite threatening. This is hard to deal with, it may be easier (mentally) to fight it.

If you expressed a poorly thought out liberal/left-wing view at Google you would also have a bunch of people tell you why you're wrong. What you probably won't have is a bunch of people taking it as an attack against them. This is because the conservative view is (almost by definition) the establishment view and the liberal view is anti-establishment. Attacks against the establishment are usually easy to shrug off, if you just ignore them they often go away. If someone published a doc on why men make inferior engineers, I doubt many men would feel the need to take it apart line by line. This opinion is not a incessant, real threat to men. Diversity and un-biasing programs are a threat to the establishment and as we see, result in strong reactions.

Other responses

I also recommend reading [Lee] and [Wojcicki] for examples of what women deal with every day.


Sunday, February 26, 2017

Getting a steam game to work on ubuntu 16.10

I bought the Humble Bundle Freedom Bundle (supporting the EFF). Before now, I had never used Steam. The install was pretty painless and some games worked just fine but some didn't (e.g. Ninja Pizza Girl). Not only did they not work but they just failed silently which is pretty crappy.
After some poking around, I found this guide, most of which did nothing but the last few commands

triggered installing some missing items

and now the game runs. I don't know which of these actually fixed it.
This is a pretty awful user experience. There was no indication what was failing or what was needed. Steam's site has no documentation that I can find on getting things working well on Linux and most of the guides I found were telling me to install packages that I already had.

Sunday, November 13, 2016

Trump's America

Shaun King's twitter compilation of nationalistic, racist assaults, abuse and general bad behaviour is horrific. The volume of incidents is remarkable. It seems pretty hard to make the case that Trump is to blame. He's a terrible person but he didn't create this, he just revealed it and in the long-run he may have done the US a favour. His election forces prosperous liberals to realize that previous victories in the "culture wars" were won and maintained by force (force of wealth, control of key assets like media and major pieces of internet infrastructure). The enemy was beaten and silenced but they were not persuaded, assimilated or brought inside the tent.

Just like you can't bomb away terrorism, you can't legislate, berate and shame away racism and bigotry. They both have deeper underlying causes that have to be tackled. I imagine they have also common underlying causes - hopelessness, alienation, seeing others prosper unjustly (in reality or just in your perception), seeing no path to prosperity inside the rules, for you or your family. Even when the rewards are trivial and the teams picked randomly, people display irrational biases for their team vs others. Humans are instinctive racists and bigots, suppressing that takes energy, motivation, thoughtfulness, generosity and other things that are in short supply for many people having a hard time.

Solving the problem requires addressing the underlying causes. Anything else is just suppressing the problem. It will still be there, seething under the surface, waiting for a chance to come out again, possibly in an even worse form.

Of course Trump and the republican party's policies over the next 4 years are probably just going to make life worse for both his supporters and his opponents, so there's the very real possibility that things will get a lot worse before they get better but a Hillary victory that allowed the left to continue ignoring Trump's supporters for 4 more years wouldn't necessarily be a better long-term result.

Saturday, April 16, 2016

Cause and effect

We went to Batman Vs Superman, we also watched Mystery Men a few weeks ago. Awesome conversation with my son Sean:

S: Why is he wearing glasses? Superman doesn't need glasses.
Me: When he's Clark Kent, he wears glasses so people don't think he's Superman.
S: ... Like Captain Amazing.
Me: Yes, just like Captain Amazing :)

Friday, January 08, 2016

(Another) Solution: Writting year as sums of runs of numbers

The solution of just grinding out of the algebra is fine but it's a bit dull and unintuitive. We can use the discussion at the end of the last post to produce a simple proof with almost no algebra.

What we're going to prove is that the number of sequences of consecutive integers that sum to \(Y\) is equal to twice the number of odd divisors of \(Y\).

First off note that if the sum is positive, then there must be more positive numbers in the sequence than negatives. I'm going to assume it's positive, if it's negative then the procedure works, just with the signs changed.

Next, note that the solutions to the problem always come in pairs. Every sequence of even length has a corresponding sequence of odd length. You can construct one from the other as follows.

If 0 appears in the sequence then you cancel every negative number with it's opposite positive number and remove the zero. Every time you cancel a \(-\) with a \(+\) you remove 2 elements from the sequence, so it stays odd or even. Finally removing the 0 flips from odd to even or vice versa. E.g. $$ -3 + -2 + -1 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 $$ becomes $$ 4 + 5 + 6 + 7 $$ 2 slightly non-obvious cases of this are sequences beginning with 0 or 1. They have no negative elements, so you just either add or remove 0 at the start.

Conversely if the sequence does not contain 0, prepend all the numbers from 0 up to the start of the sequence and also prepend their negatives. This does not change the sum but it flips the length from even to odd or vice versa. E.g. $$ 4 + 5 + 6 + 7 $$ becomes $$ -3 + -2 + -1 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 $$

So now we just consider the solutions of odd length. If we can show that there is exactly one of those for every odd divisor of \(Y\), we're done. That turns out to be fairly easy.

First, lets say you have an odd length sequence that sums to \(Y\). Since it's odd-length, it must have a middle number, let's say \(n\) and then there are \(k\) numbers before and \(k\) numbers after. The befores and afters go together in pairs. \(n-1\) with \(n+1\), \(n-2\) with \(n+2\) etc. Each of these pairs sums to \(2n\) and there are \(k\) pairs plus a lone \(n\) from the middle giving a total of \((2k+1)n\). So we have that \(Y=(2k+1)d\) and so \(2k+1\) (the length of the sequence) must be an odd divisor of \(Y\). So this shows that any sequence that sums to Y leads to a specific odd divisor of Y.

Conversely given an odd divisor of \(Y\), \(2k+1\) and we set \(n = Y/(2k+1)\) then the sequence of length \(2k+1\) centred on on \(n\) sums to \(Y\). So every odd divisor leads to a sequence of odd-length and we're done.

Sunday, January 03, 2016

Solution: Writting year as sums of runs of numbers

It turns out the answer is fairly well known and involves what are known as polite numbers but I hadn't heard of them before.

So in order to solve this, we consider sequences of positive consecutive integers. I've added "positive" in there because sequences that are all negative are just positive sequences with the sign flipped and so are not interesting. Sequences that start negative and go positive are also not interesting as you can a bunch of the numbers will cancel out and you'll be left with a sequence that's purely negative or a purely positive.

There's a well-known formula for the sequences starting at \(1\) and that the formula for triangular numbers: \(1 + 2 + ... + n = n(n+1)/2\). We can use this to get a formula for sequences that don't start at \(1\). The sum \((k+1) + (k+2) + ... + (k+n)\) is just the sum from 1 to n minus the sum from 1 to k. More formally that's \begin{equation}\label{2.1} \begin{split} &{} n(n+1)/2 - k(k+1)/2\\ =& 1/2(n^2+n -k^2 -k)\\ =& 1/2(n^2-k^2 + n -k)\\ =& 1/2((n+k)(n-k) +(n -k))\\ =& 1/2((n+k + 1)(n-k))\\ \end{split} \end{equation}

So now if we want to get a specific number \(Y\) out of that then $$ Y = 1/2((n+k + 1)(n-k)) $$ so $$ 2Y = (n+k + 1)(n-k) $$

Notice that the factors on the right hand side differ by \(2k + 1\) this means that one is always even and one odd and the odd one must be a divisor of \(Y\) (any odd divisor of \(2Y\) must divide \(Y\) also). So every odd divisor, \(d\) of \(Y\) gives us 2 possibilities. Either $$ \begin{split} &n+k+1& = d\\ &n-k& = 2Y/d\\ \end{split} $$ or $$ \begin{split} &{}n+k+1& = 2Y/d\\ &{}n-k& = d\\ \end{split} $$

Solving these for n and k we get either $$ \begin{split} n &= (d-1)/2 + Y/d\\ k &= Y/d - (d + 1)/2\\ \end{split} $$ or $$ \begin{split} n &= (d-1)/2 + Y/d\\ k &= (d - 1)/2 - Y/d\\ \end{split} $$

In both cases \(n\) is the same. The \(k\)s are different and in fact they are almost negatives of each other (add them together and you get \(-1\)). This means that for any odd divisor \(d\) you get exactly two solutions but exactly one of them will have a positive \(k\). \(n\) is positive if and only f \(d\) is positive.

So in fact for any \(Y\) there are exactly as many solutions as there are positive odd divisors of \(Y\). In the case of 2016 we have factors \(2016 =\) $$ \begin{split} d=1 &: 2016 = 2016\\ d=3 &: 2016 = 671+672+673\\ d=7 &: 2016 = 285+286+...+291\\ d=9 &: 2016 = 220+221+...+228\\ d=21 &: 2016 = 86+87+...+106\\ d=63 &: 2016 = 1+2+3+...+63\\ \end{split} $$ and for \(2015 =5*13*31\) we have $$ \begin{split} d=1 &: 2015 = 2015\\ d=5 &: 2015 = 401 + 402 + ... + 405\\ d=13 &: 2015 = 149 + 150 + ... + 161\\ d=31 &: 2015 = 50 + 51 + 80\\ d=65 &: 2015 = 2 + 3 + ... + 63\\ d=155 &: 2015 = 65 + 66 + ... + 90\\ d=403 &: 2015 = 197 + 198 + ... + 206\\ d=2015 &: 2015 = 1007 + 1008\\ \end{split} $$

In the 2015 example, the divisors 65, 155, 403 and 2015 are big enough that k becomes negative and we need to switch to the second solution. This doesn't happen at all for 2016 - the odd divisors never get very big because a lot of 2016 is kind of locked up inside the 32.

When the sequence comes from the first solution, it has exactly \(d\) elements and is centered around \(Y/d\). This makes sense intuitively, you can sum the sequence by adding the first and last, the second and second last, etc each contributes \(2Y/d\) and finally the middle one gives you one more for a total of \(dY/ = Y\).

When the sequence comes from the second solution, that doesn't work but instead of switching to solution 2, we can stick with solution 1 and accept a negative \(k\). Then we get a \(d\)-element sequence that sums to \(Y\) $$ \begin{split} d=65 &: 2015 = -1 + 0 + 1 + 2 + 3 + ... + 63\\ d=155 &: 2015 = -64 + -63 + ... + 90\\ d=403 &: 2015 = -196 + -195 + ... + 206\\ d=2015 &: 2015 = -1006 + -1005 + ... + 1008\\ \end{split} $$ each of these is actually the same as the solutions above (just cancel all the negatives with their positive counterpart)

Puzzle: Writting year as sums of runs of numbers

This year is 2016 and \[ 2016 = 1 + 2 + 3 + ... + 63 \] I didn't notice this myself, I saw it written somewhere but then I wondered if there were any other ways of writing 2016 as a sum of consecutive numbers and it turn out there are.

So, the puzzle is, how many ways are there of writing 2016 as a sum of consecutive numbers and what's the answer for the general case where you're trying to write any number \(Y\) as such a sum. The answer is quite simple but non-obvious.

I'll post the solution shortly My solution is here, please leave comments or solutions below.