wu :: forums
« wu :: forums - Digit sum of three consecutive numbers »

Welcome, Guest. Please Login or Register.
May 19th, 2024, 12:15am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: Grimbal, ThudnBlunder, Icarus, SMQ, Eigenray, towr, william wu)
   Digit sum of three consecutive numbers
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Digit sum of three consecutive numbers  (Read 2789 times)
Christine
Full Member
***





   


Posts: 159
Digit sum of three consecutive numbers  
« on: Mar 19th, 2013, 10:38am »
Quote Quote Modify Modify

Is there a method to finding a positive integer x such that each of DigitSum(x), DigitSum(x-1) and DigitSum(x+1) is divisible by a certain prime number?
 
Say the prime number is 7 or 17, how to find the smallest integer x?
 
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Digit sum of three consecutive numbers  
« Reply #1 on: Mar 19th, 2013, 11:11am »
Quote Quote Modify Modify

Either ds(x-1) and ds(x), or  ds(x) and ds(x+1) are consecutive numbers; so they can't be divisible by the same number (>1).
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: Digit sum of three consecutive numbers  
« Reply #2 on: Mar 19th, 2013, 11:15am »
Quote Quote Modify Modify

on Mar 19th, 2013, 10:38am, Christine wrote:
Is there a method to finding a positive integer x such that each of DigitSum(x), DigitSum(x-1) and DigitSum(x+1) is divisible by a certain prime number?
 
Say the prime number is 7 or 17, how to find the smallest integer x?
 

If I understand the question correctly, this does not seem possible. At least one of the differences DigitSum(x)-DigitSum(x-1) and DigitSum(x+1)-DigitSum(x) is going to be 1, so those two digit sums will be coprime.
 
Edit: not fast enough...
« Last Edit: Mar 19th, 2013, 11:15am by pex » IP Logged
Christine
Full Member
***





   


Posts: 159
Re: Digit sum of three consecutive numbers  
« Reply #3 on: Mar 19th, 2013, 12:02pm »
Quote Quote Modify Modify

Sorry I got it wrong.
 
This is what I found so far:
 
It is possible to find 3 consecutive integers such two of them have their digitsum divisible by a certain prime p and other integer divisible by the same prime p.
 
For example,
156999, 157000 and 157001
 
DigitSum(156999) = 1+5+6+9+9+9 = 39 = 3*13
DigitSum(157000) = 1+5+7+0+0+0 = 13
157001 = 13 * 12077
 
 
I don't whether this is a known or perhaps interesting result. And how to explain this?
 
But I find it very cool.
IP Logged
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: Digit sum of three consecutive numbers  
« Reply #4 on: Mar 19th, 2013, 12:25pm »
Quote Quote Modify Modify

Aha. Barring errors in my program that took all of two minutes to write, the smallest triple for p=7 is
DigitSum(609999) = 42 = 6*7
DigitSum(610000) = 7
610001 = 87143*7.
I don't really have a better method than brute-force searching over multiples of p that end in 1, though. Of course it'd be much faster to generate the middle number directly and check x+1 for divisibility. If a solution for p=19 exists, its middle number is going to end in at least 17 zeros, because that's the smallest integer for which 9k-1 is divisible by 19.
 
For p=17:
DigitSum(17899) = 34 = 2*17
DigitSum(17900) = 17
17901 = 1053*17
« Last Edit: Mar 19th, 2013, 12:57pm by pex » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Digit sum of three consecutive numbers  
« Reply #5 on: Mar 20th, 2013, 12:22am »
Quote Quote Modify Modify

Then for 19, I'd say  
19899999999999999999 => 9*19
19900000000000000000 => 19
19900000000000000001 = 1047368421052631579*19
 
However, I don't think it was Christine's intent that it's necessarily the first two where you take the digit sum. So you might get a smaller result by taking the digit sum of the first and last, or the last two.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: Digit sum of three consecutive numbers  
« Reply #6 on: Mar 20th, 2013, 12:30am »
Quote Quote Modify Modify

on Mar 20th, 2013, 12:22am, towr wrote:
However, I don't think it was Christine's intent that it's necessarily the first two where you take the digit sum. So you might get a smaller result by taking the digit sum of the first and last, or the last two.

I had convinced myself that that couldn't happen last night, but I don't recall why, and it's not making much sense now that it's morning. So... you're probably right.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Digit sum of three consecutive numbers  
« Reply #7 on: Mar 20th, 2013, 10:20am »
Quote Quote Modify Modify

For example:
ds(419) = 2*7
420 = 10*7
ds(421) = 1*7
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Christine
Full Member
***





   


Posts: 159
Re: Digit sum of three consecutive numbers  
« Reply #8 on: Mar 20th, 2013, 5:18pm »
Quote Quote Modify Modify

on Mar 20th, 2013, 10:20am, towr wrote:
For example:
ds(419) = 2*7
420 = 10*7
ds(421) = 1*7

 
Nice! is the triplet (419, 420, 421) the smallest divisible by 7?
 
what are the smallest four consecutive integers with the same property?
IP Logged
pex
Uberpuzzler
*****





   


Gender: male
Posts: 880
Re: Digit sum of three consecutive numbers  
« Reply #9 on: Mar 21st, 2013, 12:26am »
Quote Quote Modify Modify

on Mar 20th, 2013, 5:18pm, Christine wrote:
Nice! is the triplet (419, 420, 421) the smallest divisible by 7?
Yes. This time I simply checked all triplets starting at (1,2,3) to be sure. Cool
 
on Mar 20th, 2013, 5:18pm, Christine wrote:
what are the smallest four consecutive integers with the same property?
Can there be any? Out of those four, only one can be divisible by 7, so three would need to have digit sums divisible by 7. But at least two of these three have the same digits except for the least significant place, which cannot differ by 7 either.
IP Logged
ravibhole_1
Newbie
*





   


Posts: 6
Re: Digit sum of three consecutive numbers  
« Reply #10 on: Apr 7th, 2013, 9:53am »
Quote Quote Modify Modify

It is not possible
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board