02 May 2009

Musing on a class of numbers

There is a little puzzle around in mathematical tuition sites that talks about polite numbers. These are numbers that are equal to the sum of a sequence of (at least two) consecutive positive numbers, so for example 2+3+4+5=14, so 14 is a polite number.

The question asks, "Which numbers are polite and which impolite?" I won't spoil it with an explicit answer.

But anyway, this got me thinking about another class of numbers, which I decided to call civil numbers. These are numbers which are "polite" by virtue of two consecutive sequences for example 15 = 4+5+6 = 7+8. Every formation sequence-sum is linked to an odd factor of the target number, either as the length of the sequence or as twice the centre-value: so 4,5,6 links to 3 and 7,8 links to 15. Also each odd factor generates exactly one sequence sum. As I explored these civil numbers it became clear that I needed to allow a sequence of length 1 also, which extended the class of civil numbers by exactly one member: 3 = 1+2 = 3.

Some fun facts:
  • Only 15 and 3 use a sequence of length 2 in their formation sum.

  • Any civil number can be multiplied by an odd square to produce another civil number.

  • Even disqualifying such "derived" civil numbers, there are an infinite number of civil numbers including...

  • for each consecutive pair of numbers, there is a civil number (one only) composed of adjacent sequences of those lengths. Example, at random: 315 and 316 length sequences are used to form 31404870 = (99225+...+99540) = (99541+...+99855)
    This is also the highest civil number that uses a 315-length sequence.

  • All civil numbers are divisible by 3 (proven, if a little tricky)

  • Doubly and n-fold civil numbers exist (105 is the smallest doubly-civil) composed of more than one pair of adjacent sequences, and can also be multiplied by any odd square to produce another such.

I also looked for the elusive gallant numbers (which may well not exist), which are "polite" by virtue of three consecutive sequences. 42 (which is civil) is a near-miss for gallantry, I guess, at 42 = 3+4+5+6+7+8+9 = 9+10+11+12 = 13+14+15 , with the first two sequences overlapping at 9. I should warn anyone contemplating renewing my search that I have eliminated the possibility of such a number exisiting that is less than 100 million. If any exist, then of course there are an infinite number of these too, because again multiplying by any odd square would produce another one.

I see Dr Ron Knott has some interesting pages on what he calls Runsums. Civil numbers are called "Neighbourly Runsums".