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

 4,4,4,4.... (Posted on 2007-07-31)
I chose a certain sequencing rule, and I told my friend no matter what number he named, it would eventually end up at repeating 4s.

At first he chose 5, which ended in 4, 4, 4... Then he tried 18, which met the same fate. Even numbers like -42 and Pi ended in 4, 4, 4...

Still trying to outdo me, he started to get really creative. He tried 63424563562324 ... same. He even tried a googolplex and Avogadro's number. But alas all the numbers he tried ended up in 4,4,4. Finally he conceded.

What's the sequencing rule I use? Should he have conceded? Can you find any starting terms which don't end in 4, 4, 4...?

 See The Solution Submitted by jduval Rating: 4.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 63424563562324 | Comment 5 of 8 |
sixty-three trillion four hundred twenty-four billion five hundred sixty-three million five hundred sixty-two thousand three hundred twenty-four                          123
one hundred twenty-three     21
twenty-one     9
nine           4
four           4
four           4
four           4
four           4
four           4
four           4
four           4

DEFDBL A-Z
DECLARE SUB ProcPiece (piece\$, MajorPower)
DATA one,two,three,four,five,six,seven,eight,nine
DATA ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen
DATA eighteen,nineteen
DATA twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety
DIM SHARED unit\$(19), ten\$(10), major\$(7)
FOR i = 1 TO 19
NEXT
FOR i = 2 TO 9
NEXT
FOR i = 1 TO 7
NEXT
DIM SHARED name\$, num\$
n = 63424563562324#
FOR iterations = 1 TO 33
num\$ = LTRIM\$(STR\$(n))
IF num\$ = "0" THEN
name\$ = "zero"
ELSE
name\$ = ""
MajorPower = 0
DO
l = LEN(num\$): IF l > 3 THEN l = 3
piece\$ = RIGHT\$(num\$, l)
num\$ = LEFT\$(num\$, LEN(num\$) - l)
CALL ProcPiece(piece\$, MajorPower)
MajorPower = MajorPower + 1
LOOP WHILE LEN(num\$) > 0
END IF
tVal = 0
FOR i = 1 TO LEN(name\$)
lt\$ = MID\$(name\$, i, 1)
IF INSTR("abcdefghijklmnopqrstuvwxyz", lt\$) > 0 THEN
tVal = tVal + 1
END IF
NEXT
n = tVal
PRINT name\$, n
'        IF tVal = 100 THEN PRINT n
NEXT

SUB ProcPiece (piece\$, MajorPower)
piece = VAL(piece\$)
n\$ = ""
IF piece > 99 THEN
n\$ = unit\$(piece \ 100) + " hundred "
piece = piece MOD 100
END IF
IF piece > 19 THEN
n\$ = n\$ + ten\$(piece \ 10)
piece = piece MOD 10
IF piece > 0 THEN n\$ = n\$ + "-":  ELSE n\$ = n\$ + " "
END IF
IF piece > 0 THEN n\$ = n\$ + unit\$(piece) + " "
IF n\$ > "" THEN name\$ = n\$ + major\$(MajorPower) + " " + name\$
END SUB

Edited on August 7, 2007, 12:22 pm
 Posted by Charlie on 2007-08-07 12:17:12

 Search: Search body:
Forums (0)