Chasing base-10 Harshad numbers

 

A Harshad number, or Niven number (in a given number base),

is an integer that is divisible by the sum of its digits (when written in that base).

[Wikipedia]

 

Hello SeqFans

 

[E-mail with minor editing thanks to Douglas McNeil]

 

Let us start with 11; is 11 divisible by (1+1)=2?

No. We then add 2 to 11 => 13

 

Is 13 divisible by (1+3)=4?

No. We then add 4 to 13 => 17

 

Is 17 divisible by (1+7)=8?

No. We then add 8 to 17 => 25

...

 

Non-Harshad 11 needs 25 steps to hit 247 -- which is Harshad:

 

11-13-17-25-32-37-47-58-71-79-95-109-119-130-134-142-149-163-173-184-197-214-221-226-236-247 (247/13=19)

 

n   steps to reach a Harshad:

1     0

2     0

3     0

4     0

5     0

6     0

7     0

8     0

9     0

10    0

11    25

12    0

13    24

14    3

15    1

16    6

17    23

18    0

19    2

20    0

21    0

...

0-step are the Harshad numbers, of course:

http://www.research.att.com/~njas/sequences/A005349

 

We could build a seq where n is the required number of steps for the smallest a(n) to hit a Harshad; this seq would start like this (I think):

 

S = 15,19,14,a,b,16,...

 

15 is the smallest integer needing 1 step  to hit a Harshad

19 is the smallest integer needing 2 steps to hit a Harshad

14 is the smallest integer needing 3 steps to hit a Harshad

 a is the smallest integer needing 4 steps to hit a Harshad

 b is the smallest integer needing 5 steps to hit a Harshad

16 is the smallest integer needing 6 steps to hit a Harshad

...

 

Could someone compute a hundred or so terms of S (if of interest)?

 

Is it possible for an integer not to hit an Harshad at some point?

 

Best,

É.

__________

 

[Douglas McNeil]:

 

> We could build a seq where n is the required number of steps for the smallest a(n) to hit a Harshad[.]

 

I find

 

sage: S

[15, 19, 14, 28, 23, 16, 22, 65, 55, 142, 134, 130, 119, 109, 95, 79, 71, 58, 47, 37, 32, 25, 17, 13, 11, 44, 256, 245, 235, 815, 1313, 1489, 1469, 1510, 1493, 1480, 1829, 1828, 1814, 1789, 1772, 3115, 4295, 4276, 4262, 4246, 4229, 4216, 4196, 4177, 4163, 4147, 4183, 4166, 4153, 4142, 4132, 4118, 4111, 4094, 4081, 8914, 8885, 8857, 8834, 8809, 8783, 8761, 8741, 8722, 8699, 8674, 8648, 8626, 8597, 8569, 8546, 8530, 8513, 8491, 8471, 8452, 8429, 8413, 8387, 8365, 8345, 8326, 8312, 8287, 8270, 8248, 8228, 8209, 8186, 8170, 8153, 8140, 31085, 31072]

 

> Is it possible for an integer not to hit an Harshad at some point?

 

Probably not.

 

Doug

Department of Earth Sciences

University of Hong Kong

__________

 

[Claudio Meller]:

 

(...) values:

 

15, 19, 14, 28, 23, 16, 22, 65, 55, 142, 134, 130, 119, 109, 95, 79, 71, 58, 47, 37, 32, 25, 17, 13, 11, 44, 256, 245, 235, 815, 1313, 1489, 1469, 1510, 1493, 1480, 1829, 1828, 1814, 1789, 1772, 3115, 4295, 4276, 4262, 4246, 4229, 4216, 4196, 4177, 4163, 4147, 4183, 4166, 4153, 4142, 4132, 4118, 4111, 4094, 4081, 8914, 8885, 8857, 8834, 8809, 8783, 8761, 8741, 8722, 8699, 8674, 8648, 8626, 8597, 8569, 8546, 8530, 8513, 8491, 8471, 8452, 8429, 8413, 8387, 8365, 8345, 8326, 8312, 8287, 8270, 8248, 8228, 8209, 8186, 8170, 8153, 8140, ...

__________

 

[Hans Havermann]:

 

I’ve put a "b-file" [in progress] here:

http://chesswanks.com/seq/StepsToHarshad.txt

 

... and you might like this:

http://chesswanks.com/blahg/odo/Blog/Entries/2010/9/29_Accumulating_factors.html

 

__________

 

Many thanks, Doug, Claudio and Hans!

Best,

É.

[September 20th, 2010]