BYE-LAWS of the H.PIPER STEAM-ENGINE RAILROAD (H.P.S-E.R.R.)
1. Every train on the H.P.S-E.R.R. must comprise only consecutively serial-numbered wagons.
2. Once chosen, such wagons must be assembled in ascending order of the quantity, size and (if necessary) power of the distinct prime factors of the wagons’ serial-numbers; e.g car 41 before car 1681(41,41) before car 39(3,13 )before car 30(2,3,5).
3. The lowest serial-numbered wagon must be in caboose* position.
If the serial-number of the first wagon in today's train is a perfect cube, what is the maximum length of the train?
(Small hint: wagon No. 194481 is the most recent addition to the rolling stock of the H.P.S-E.R.R.)
There is also a bonus, for the ingenious reader.
* a 'caboose' is the last wagon at the back end of the train.
(In reply to
extra credit by broll)
Thank you for point out my misinterpretation of the problem,
although this does not affect the position of the caboose, it could have possibly invalidated my answer so I reran the search with the corrected ordering function and luckily came up with the same solution. The corrected ordering is shown below. However, it did affect my extra credit answer, as when I reran that search it gave the longest train as 4591 from 162690 to 167280.
{4096,4099,4111,4127,4129,4133,4139,4153,4157,
4159,4177,4201,4211,4217,4219,4229,4231,4241,
4243,4253,4259,4261,4271,4273,4283,4289,4232,
4288,4192,4112,4208,4168,4184,4124,4132,4156,
4196,4204,4244,4252,4276,4106,4126,4138,4162,
4166,4174,4178,4198,4222,4226,4258,4262,4274,
4282,4286,4131,4107,4239,4113,4149,4167,4203,
4101,4119,4143,4197,4227,4269,4281,4287,4225,
4205,4175,4105,4115,4135,4145,4195,4265,4285,
4109,4151,4193,4207,4249,4103,4169,4213,4279,
4121,4097,4267,4237,4117,4163,4247,4181,4141,
4223,4171,4183,4187,4189,4116,4224,4212,4104,
4176,4128,4248,4266,4272,4152,4122,4194,4164,
4188,4236,4098,4146,4206,4254,4160,4250,4100,
4240,4150,4120,4280,4220,4190,4210,4256,4144,
4214,4172,4228,4102,4114,4136,4268,4202,4246,
4264,4108,4238,4216,4148,4142,4118,4234,4154,
4125,4275,4185,4155,4215,4245,4263,4221,4137,
4179,4257,4191,4173,4251,4233,4161,4209,4235,
4165,4255,4277,4123,4147,4199,4200,4140,4230,
4260,4110,4170,4158,4284,4242,4134,4182,4218,
4278,4130,4270,4180,4186,4095}
Edited on October 2, 2010, 9:16 pm
|
Posted by Daniel
on 2010-10-02 21:07:19 |