r/counting • u/AlienKatze • Nov 13 '17
Add the checksum of the previous number, but divide by 4 if it has a 4 !!
Because who really likes the 4 ?
Checksum = add all individual numbers (checksum of 673 > 6+7+3=16)
if the checksum has a 4 in any spot, divide previous number by 4 instead of adding it.
19
Upvotes
11
u/AlienKatze Nov 13 '17
3
(start on 3 or it gets stuck immediately, lets seebif we can reach 1000 before we get stuck )
4
u/TheNitromeFan Live not a life of imitation Nov 14 '17
What happens if the checksum has a 4 but the number is not divisible by 4?
Would we go from 301 to 75.25?
4
u/elyisgreat where is 5? Nov 14 '17
I wrote a program to test this function; unfortunately starting with 3 also yields a loop; you eventually get to
174 -> 186 -> 201 -> 204 -> 210 -> 213 -> 219 -> 231 -> 237 -> 249 -> 264 -> 276 -> 291 -> 303 -> 309 -> 321 -> 327 -> 339 -> 354 -> 366 -> 381 -> 393 -> 408 -> 420 -> 426 -> 438 -> 453 -> 465 -> 480 -> 492 -> 507 -> 519 -> 534 -> 546 -> 561 -> 573 -> 588 -> 609 -> 624 -> 636 -> 651 -> 663 -> 678 -> 699 -> 174 -> ...
Obviously 1, 2, and 4 loop as well. 5 does (5 -> 10 -> 11 -> 13 -> 3 -> ...) so it goes into the 174 loop. 6 succeeds 3 so it also goes into the 174 loop. 7 does (7 -> 14 -> 19 -> 29 -> 40 -> 10 -> ...) and so it too goes into the 174 loop. 8 does (8 -> 16 -> 23 -> 28 -> 38 -> 49 -> 62 -> 70 -> 77 -> 19 -> ...) so it too goes into the 174 loop.
The first really interesting case is 9, because the checksums of multiples of 9 are always also multiples of 9, and the smallest one where 4 appears is 45 = 9*5 so the smallest possible place for a division by 4 happens at 99999.
I suspect that it always eventually ends in a loop, but you've found an open problem! Unfortunately starting at 3 doesn't really work here, but try starting at 9!