All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Quite a Smithonian! (Posted on 2010-08-21) Difficulty: 3 of 5
A Smith number is a composite number for which, the sum of its digits is equal to the sum of the digits in its prime factorization.
By definition, the factors are treated as digits.
For example, 22 =2*11 is a Smith numberbecause 2 + 2 = 2 + 1 + 1.
Another example: 666 = 2*3*3*37 and 6+6+6 = 2+3+3+(3+7 ).

The following table provides the least number of the 1st occurrence of K consecutive Smith numbersfor K=1, 2, 3, …

Please extend it as far as you are able to.

K ......First member of the least K-tuplet
1 ......4
2 ......728
3 ......73615**
4 .......FIND OUT
5 .......FIND OUT
6 +++ How far can you reach?


**Rem: The third number is 73615, since (73615, 73616, 73617) is the first example of 3 consecutive Smith numbers.
G o o d L u c k !

No Solution Yet Submitted by Ady TZIDON    
Rating: 3.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Question re: 7-up | Comment 2 of 8 |
(In reply to 7-up by Dej Mar)

I'd be curious as to the method of finding those large Smith numbers.  The program below only ventured to check up to 1 million, and as a result found no groups larger than 3:

DECLARE FUNCTION sodFact# (num#)
DECLARE FUNCTION sod# (x#)
DEFDBL A-Z
DIM SHARED prime
CLS
FOR i = 1 TO 1000000
  IF sod(i) = sodFact(i) THEN
   IF prime = 0 THEN
    IF i <> prev + 1 THEN
      IF smCt > 2 THEN
        FOR j = 1 TO smCt
          PRINT h(j);
        NEXT
        PRINT
      END IF
      smCt = 1
      h(smCt) = i
      prev = i
    ELSE
      smCt = smCt + 1
      h(smCt) = i
      prev = i
    END IF
   END IF
  END IF
NEXT

FUNCTION sod (x)
n$ = LTRIM$(STR$(x))
t = 0
FOR i = 1 TO LEN(n$)
  t = t + VAL(MID$(n$, i, 1))
NEXT
sod = t
END FUNCTION

FUNCTION sodFact (num)
 totl = 0
  n = ABS(num): IF n > 0 THEN limit = SQR(n):  ELSE limit = 0
 IF limit <> INT(limit) THEN limit = INT(limit + 1)
 dv = 2: GOSUB DivideIt
 dv = 3: GOSUB DivideIt
 dv = 5: GOSUB DivideIt
 dv = 7
 DO UNTIL dv > limit
   GOSUB DivideIt: dv = dv + 4 '11
   GOSUB DivideIt: dv = dv + 2 '13
   GOSUB DivideIt: dv = dv + 4 '17
   GOSUB DivideIt: dv = dv + 2 '19
   GOSUB DivideIt: dv = dv + 4 '23
   GOSUB DivideIt: dv = dv + 6 '29
   GOSUB DivideIt: dv = dv + 2 '31
   GOSUB DivideIt: dv = dv + 6 '37
   IF INKEY$ = CHR$(27) THEN EXIT FUNCTION
 LOOP
 IF n > 1 THEN totl = totl + sod(n): pct = pct + 1
 IF pct = 1 THEN prime = 1:  ELSE prime = 0
 sodFact = totl

 EXIT FUNCTION

DivideIt:
 rep = 0
 DO
  q = INT(n / dv)
  IF q * dv = n AND n > 0 THEN
    totl = totl + sod(dv): pct = pct + 1
    n = q
    IF n > 0 THEN limit = SQR(n):  ELSE limit = 0
    IF limit <> INT(limit) THEN limit = INT(limit + 1)
   ELSE
    EXIT DO
  END IF
 LOOP
 RETURN
END FUNCTION

designed to find triples and above, finds only 
 
  73615   73616   73617
 209065  209066  209067
 225951  225952  225953
 283745  283746  283747
 305455  305456  305457
 342879  342880  342881
 656743  656744  656745
 683670  683671  683672
 729066  729067  729068
 747948  747949  747950
 774858  774859  774860
 879221  879222  879223
 954590  954591  954592


 
so no quadruplets or higher occur starting below one million.


  Posted by Charlie on 2010-08-22 01:32:43
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information