A longevity chain is a sequence of consecutive positive integers, whose digit sums are never a multiple of 9. What is the longest possible length of a longevity chain?
For similar problems, you can read my note on Construction .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
didn't understand the question well!!
Log in to reply
See my reply to Narisa Thamveerapong's comment. I explained it there... :)
I thought that it asked when will it not have a multiple of nine. So if you go two after eight, the sum will not be a multiple of nine. question was not worded will
I really don't understand the question.
Log in to reply
Actually, the chain is not restricted to start from 1 . The chain can start with any positive integer and must consist of consecutive positive integers starting from the first integer of the chain but when the chain reaches before a multiple of 9 , it terminates as the chain cannot have multiples of 9 . Now, since multiples of 9 come after every 8 integers , so the chain can have at maximum all those 8 integers in that range which are not multiples of 9 . So, the chain can have maximum possible length = 8
Log in to reply
Even I said the same thing! Isn't it?
Log in to reply
@Aditya Prakash – No, the mistake you made was considering that the chain starts from 1 . The chain can start from any positive integer (like 3 , 1 1 , etc.). But for max. length of the chain we can see that since after every 8 integers, we get a multiple of 9 , so the max length can be made by taking all those 8 consecutive non-multiples in the chain, so max length = 8 .
The chain can also be like this ----->
( 1 0 , 1 1 , 1 2 , . . . . , 1 7 ) or ( 2 0 , 2 1 , 2 2 , . . . . . , 2 8 ) , etc.
You have to count the number of positive integers till the first integer which is divisible by 9 comes! i.e(1,2,3,4,5,6,7,8) total count=8. :)
Log in to reply
That is actually not correct because the sum of {1,2...7,8} is 36 which is divisible by 9
Log in to reply
@Maarten van Helden – The sum being referred to is not the sum of the elements of the sequence, but rather the digit sum of each number in the sequence.
i THOUGHT THE CHAIN WOULD CONTINUE WITH SUCH SEQUENCES
positive integers do include zero '0' so the answer must be 9! isint it!?
Log in to reply
Actually it is said that multiples of 9 cannot be in the chain. So, if you have the chain from the first positive integer which is 1 , then the chain goes like this --->
1 , 2 , 3 , . . . . , 8 .
9 will not be in the chain as 9 is a multiple of 9 . So, if you count you have 8 integers in the chain not 9 . So, the answer should be 8 . By the way, the chain is not restricted to start from 1 . It can start from any positive integer but the max length possible for the chain is 8 .
Log in to reply
Oh cool! by the way i know that 9 cannot be in the chain! but by mistake i counted 0 also in the chain and later on realized that even 0 can be a multiple of 9! :)
Log in to reply
@Aditya Prakash – Yes, you can say that but we also have yet another reason to not take 0 in the chain. The reason is that 0 is neither a positive nor a negative integer and it is said that the chain contains consecutive positive integers . However, your reason is also partly correct... :)
but 0 is also a positive integer..
Log in to reply
You're right! But it is considered as as one of the multiple of 9! So answer is 8!
No, actually not. 0 is an integer but it cannot be stated as either positive or negative as + 0 and − 0 both point to the same thing,i.e, 0 .
The question is badly posed. Better would be find the longest chain of consecutive integers each of which is not divisible by 9. Then anyone can solve it and the answer is 8.
12345678 is a number formed by consecutive positive integers and it is of length 8. but its digit sum which is 36 is a multiple of 9. Then how can the ans be 8?
I don't understand what is being asked. If I write 11,111,111 the digit sum is 8. If I write 111,111,112 the length is 9, the digit sum is 10.
Log in to reply
Consecutive means following each other continuously, so 1,1,1,1 is not allowed. It has to be 1,2,3,4 or 25,26,27, 28,29 etc
This is actually not completely unambiguous. For this to be true you have start with 0, which is a multiple of 9. I am inclined to stop there en conclude you cannot start with 0 or 9 or 18 for that matter. If you can ignore the first multiple of 9, why not the 2nd 3rd or nth. Than the length can be infinite. So that was my choice. If that is not the right answer then we should exclude the first multiple of 9. Then we should start at the digit after the multiple of 9 and then the answer is 7.
I read this as meaning that each of the digits added together could not be divided by 9. so from 2 to 9, added together is not divisible by 9, but I do not know how to continue without trial and error.
but cant it be 0,1,2,3,4,5,6,7,8 after that 9 whose digit sum is multiple of 9 so shouldnt it be 9 integers
The question said that digit sums are never a multiple of 9, but what about -8 to 8. There are 17 integers.
Log in to reply
0 is a multiple of 9 but moreover it is said in the question that the sequence should contain positive consecutive integers, so any negative values ( ( − 8 ) , ( − 7 ) , . . . . ) cannot be in the chain.
Log in to reply
what about 91 to 107???
Log in to reply
@Diptesh Sil – I believe that 9 9 is also a multiple of 9 , don't you think so ?? :D
0 is a multiple of 9, for your kind information.
Edit: so the answer remains unchanged even if all INTEGERS are concerned.
but you cannot take negetive integers .
It says positive integer
The condition is the digit sum of positive integers, so a multiple of 9 must occur after every eight POSITIVE integers, so you can't count it from -8
We can see that digit sum of any 1 -digit number n is the digit itself and starting from 1 till 8 , none of them have digit sum as multiple of 9 since 9 's first multiple is 9 itself. So, the chain can have the max. length of 8 --- from 1 to 8 .
So, the chain has max. length = 8
Edit: An integer n has a digit sum divisible by 9 iff n itself is divisible by 9, so the problem is equivalent to asking "what is the maximum number of consecutive integers not divisible by 9?" which is obviously 8 (the numbers between any two consecutive multiples of 9, ie, the nontrivial residue classes modulo 9).
The chain does not need to start from 1. It could start from 100.
Log in to reply
Hmmm....that's why I couldn't solve the Part - II of this question. Thanks for the information. :)
The sum of m consecutive numbers can be represented as follows: n + (n +1) + (n +2) .... (n + (m-1)) = mn + (1 +2 +3 + .. . + (m-1)). Let's start with the smallest number that is 8, where m = 8 and n = any number is n + (n +1) + (n +2) ... (n + (8-1)) = 8n + (1 +2 +3 + ... + (8-1)) = 8n +28 -> the sum of 8 consecutive integers is not divisible by 9, since 9 must divide the coefficient and the sum. So the result is greater than or equal to 8. Now with the next, which is the sum of 9 consecutive integers, m = 9 n = any number, n + (n +1) + (n +2) + ... + (n + (9-1) = 9n +36 9 divides the coefficient and the sum, so the answer is 8.
If the digits add to a multiple of nine, the number is a multiple of nine. There can be 8 digits between multiples of 9.
I think we can also use A.P to solve this problem.
How can we use AP ?
Hallo,so easy,
As digit sums ,1+2+3+4+5+6+7=28(not a multiple of 9),
once, digit sums , 28+8 = 36(visible by 9)
therefore,it is started divisible by 9 at 1,2,3,4,5,6,7,8,.....
thanks....
but 23456789 is not divisible by 9, nor 234567890, But doing this by trial and error does not seem right
THE SUM WILL BE x+x+1+x+2+x+3 AND SO ON. THIS EQUALS N(X+Y) WHERE N IS THE NO. OF NUMBERS ADDED, AND Y IS SUM OF CONSTANTS IN ADDITION DIVIDED BY N. HERE THE LEAST VALUE FOR N SUCH THAT THE SUM IS DIVISIBLE BY 9 IS 9. THAT IMPLIES THERE ARE N NO.S IN THE ADDITION. SO THE MAXIMUM NO. OF CONSECUTIVE POSITIVE NO.S WHOSE SUM IS NOT DIVISIBLE BY 9 IS 9-1=8.
A multiple of 9 comes after 8, i.e 9*1=9,,,so the answer is=8
Problem Loading...
Note Loading...
Set Loading...
A multiple of 9 occurs after every eight consecutive numbers. Hence our required answer is 8.