Let's define
persistence of an integer number p(N) as the number of times one has to multiply said number's digits before reaching a single digit.
Examples: 48==>32==>6, so p(48)=2;
23568643407==>0 , so p(23568643407)=1
Three tasks:
a. (easy). Comment on the value of p(N!) for a non-negative N.
b.(harder) What can be said of the values of p(N) in bases 2 or 3.
c. (hardest) How many 3-digit integers with p(N)=3 are there?
Try to solve analytically.
a. N! ends in zero if N>4 so
if N=0,1,2,3 P(N)=0 (as they are already single digit)
if N=4, P(N)=1 (but ends at 2*4=8)
if N>4, P(N)=1 (these always ends at 0)
b. base 2, most numbers contain at least one zero so would have persistence 1.
The only exceptions are numbers with all 1's. They are of the form 2^n - 1. They will also have persistence 1.
(Except for 0 and 1 itself which have persistence 0.)
base 3 is a bit more complicated, to get persistence beyond 1 the number must have no 0's and multiple 2's.
The only known powers of 2 with no zeros in base 3 are 0,1,2,3,4,15
according to https://oeis.org/A102483
<switching to base 3 mode>
P(22)=2, since 2*2=11, 1*1=1
P(222)=3, since 2*2*2=22, 2*2=11, 1*1=1
P(2222)=2, since 2*2*2*2=121, 1*2*1=2
P(222222222222222)= 3, since 2*2*...*2=1122221122, 1*1*...*2=2101, 2*1*0*1=0
Insert 1's anywhere in the above numbers for the full list.
<exit base 3 mode>
c. Seems complicated to do analytically as some P(n) exceeds 3.
P(999)=4, for example, 9*9*9=729 so P(729)=3 as do permutations of these digits.
Edited to finish the base 3 case, but I can't change the title.
Edited on December 24, 2017, 2:23 pm
|
Posted by Jer
on 2017-12-24 13:52:03 |