[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

420.0. "number of letters in numbers" by SPRITE::OSMAN () Thu Jan 09 1986 19:56


	The total number of letters in this sentence is _ .



Fill in the blank with a spelled out expression.  Here's some wrong answers.

	. . . thirtynine.

Whoops, that was only counting original letters, so now there's 49.  So change
our answer to

	. . . fortynine.

Whoops, we just subtracted 1 letter, so try

	. . . fortyeight.

Whoops, we just gained a letter so we're back to 49, so try

	. . . fortynine.

This will clearly loop, so this just won't do.  Maybe it's impossible to
have a single number.  Is this provable ?  A single number is a more desirable
answer than an expression.  If single number is impossible, let's start again
and try an expression.  How about

	. . . thirty plus nine.

That added 14 letters, so make it

	. . . fifty plus three.

That seems to do it.  Perhaps other sentences in this spirit aren't so easily
solved ?

(Many of us have seen similar problems like "this sentence contains _ a's
and _ b's and _ c's . . . and _ z's."  However, I'm interested right now
in sentences that have only one missing quantity.  The one I posed wasn't
hard to solve, but are others ?)

/Eric
T.RTitleUserPersonal
Name
DateLines
420.1R2ME2::GILBERTFri Jan 10 1986 00:1725
There are no solutions in 'simple numbers' (such as thirty-nine).

And this has no solution, either:
	The number of letters in this sentence is exactly _ .

But there *is* the following(the unique solution):
	The total number of letters in this sentence is exactly fifty-five.

If hyphens were letters (which they're not usually) then forty-nine
would be the only solution to the original problem.

Note that the phrases 'ten letters' and 'fourteen letters' are correct.

Am I amazing or what?

Actually, this isn't very amazing.  For each number (x) in the range 0 .. 200,
compute the value of x - f(x), where f(x) is the number of letters in the
string of the 'cardinal number x.  Note that if x is greater than 200, then
the expression x - f(x) is always greater than 100.

Your original problem wanted x - f(x) = 39.
The problem '_ letters' wanted x - f(x) = 7.  So I looked up 7 in a little
table, and found 10 and 14.

Easy.
420.2METOO::YARBROUGHFri Jan 10 1986 11:534
The square of the number of the letters in this sentence is six thousand
five hundred and sixty one.

Lynn
420.3SPRITE::OSMANFri Jan 10 1986 19:0012
	The ratio of vowels to consonants in this
	sentence is _.

Fill in the blank with a spelled fraction, for instance

	twenty-three / thirty-six

If not, prove impossible.  Note that there's some leeway due to non-reduced
fraction possiblities.

/Eric
420.4R2ME2::GILBERTMon Jan 13 1986 02:151
This sentence is incorrect.
420.5JOEL::BERMANMon Jan 13 1986 16:441
If this sentence had fifty-four fewer letters, it would disappear.
420.6The implicit challenge in .2 is accepted!ZFC::DERAMODaniel V. D'EramoSun Nov 15 1987 17:294
    The cube of the number of letters in this true sentence is
    eight hundred thirty thousand five hundred eighty-four.
    
    Dan
420.7501 ^ 17ZFC::DERAMODaniel V. D'EramoWed Nov 18 1987 16:1411
      The seventeenth power of the number of letters in this
      statement is seven quattuordecillion, eight hundred and
      ninety-two tredecillion, nine hundred and eighty-six
      duodecillion, one hundred and thirty-one undecillion, eight
      hundred and eighty-seven decillion, eight hundred and
      ninety-seven nonillion, nine hundred and forty-six
      octillion, thirteen septillion, eighty-one sextillion, eight
      hundred and eighteen quintillion, five hundred and
      sixty-eight quadrillion, five hundred and twenty-three
      trillion, eight hundred and thirty-five billion, thirty-four
      million, eight thousand, five hundred and one.
420.8A new target for the nat'l debt?SQM::HALLYBProfitus InterruptusWed Nov 18 1987 16:307
    Re: .7
    
    Bravo!!!!!!!!!!!
    
    Now can you do the same with factorials?
    
      John
420.9Now that you mention it ...ZFC::DERAMODaniel V. D'EramoWed Nov 18 1987 21:169
    Re: .-1
    
>>    Now can you do the same with factorials?
    
    I was going to do "The nth Fibonacci number, where n is the number
    of letters in this sentence, is ..." but factorials are a good idea,
    too!
    
    Dan
420.10102! has 162 digitsZFC::DERAMODaniel V. D'EramoWed Nov 18 1987 22:1412
     Re: .8
    
>>       Now can you do the same with factorials?

     I had to "cheat" a little bit because of the growth rate of
     the factorial function.  How's this:

          The number of decimal digits in the factorial
          of the number of letters in this sentence is
          exactly one hundred and sixty-two.

     Dan
420.11The 85th Fibonacci number is 259695496911122585ZFC::DERAMODaniel V. D'EramoWed Nov 18 1987 22:2311
     Re: .9
    
>>   I was going to do "The nth Fibonacci number, ..."

     I had to "cheat" a little bit because of the growth rate of
     the Fibonacci sequence.  How's this:

          There are eighteen digits in the nth Fibonacci number,
          where n is the number of letters in this sentence.

     Dan
420.12Would be easier if I had a computer :^)ZFC::DERAMODaniel V. D'EramoWed Nov 18 1987 22:412
          The nth prime number is four hundred and nineteen,
          where n is the number of letters in this sentence.
420.13CHOVAX::YOUNGBack from the Shadows Again,Thu Nov 19 1987 01:389
    Re .12:
    
    This old brain of mine cannot imagine how you could have done
    .7 without a computer in my lifetime.
    
    Of course I cannot imagine how ANYone could d without a computer
    ;-)
    
    --  Barry
420.14Didn't you see the ":-)"?ZFC::DERAMODaniel V. D'EramoThu Nov 19 1987 14:219
    I confess, the smiley face in the title to .12 meant that I really
    did use a computer for the seventeenth power and later ones.  For
    the cube I only used the computer to compute the cubes, and after
    counting the letters by hand to doublecheck the count.
    
    I shall have to retire from this for a while; our group is moving
    from HLO to DLB this weekend, and the machine comes down this afternoon
    and won't be available to me until Monday morning.  When I'm back
    I will describe the search method that I used.
420.15has anyone checked Deramo's work ??VIDEO::OSMANtype video::user$7:[osman]eric.sixThu Nov 19 1987 19:216
I strongly suggest someone check Deramo's results, particularly if you
plan on pasting those sentences on your cube, or showing them to friends.

They might not be correct !

/Eric
420.16"Trust me, I know what I'm doing" -- Sledge HammerZFC::DERAMODaniel V. D'EramoMon Nov 23 1987 16:1527
    Re .-1
    
>>    I strongly suggest someone check Deramo's results, particularly
>>    if you
>>    plan on pasting those sentences on your cube, or showing them to
>>    friends.
>>    
>>    They might not be correct !
    
    Yes, please do!  I would hate to have a bug in my program discovered
    *after* copies were spread around!  If the Fibonacci one looks wrong,
    be careful; I think I started with F0 = 0, F1 = 1, which may not
    be universal.
    
    Over the weekend I had been thinking of starting a new topic about
    verifications of claims in notes, especially things that can be
    checked by computer [e.g., n is prime, or this topic].  I agree
    that it is something that should be done, and may be my next priority
    one background batch job.
    
    P.S.  My last name is spelled:
    
         D'Eramo
    
    but you can call me Dan.

    Dan
420.17Impress your friends without even tryingZFC::DERAMODaniel V. D'EramoTue Nov 24 1987 16:0985
     First, you have to have VAX LISP.  It has, BUILT IN, such
     neat stuff as bignums:

          Lisp> (expt 501 17)
          7892986131887897946013081818568523835034008501

     so that you don't have to write your own multi-digit
     arithmetic package, and number spelling:

          Lisp> (format nil "~R" 419)
          "four hundred and nineteen"
          Lisp> (format nil "~:R" 419)
          "four hundred nineteenth"

     Disappointment number 1:  I had always been taught that the
     word "and" is not to be used when spelling or pronouncing an
     integer, although it may be used to separate the integral
     and fractional parts of a number.  So it is correct to say
     "four hundred nineteen" or "four dollars nineteen cents" or
     "four dollars and nineteen cents" but it is incorrect to say
     "four hundred and nineteen."  Sigh.  So I should write a
     COMMON LISP "and" remover and redo some of my earlier notes.

     Anyway, to make a sentence one may use:

          (defvar *pattern*
"Take the number of letters in this sentence, subtract seventeen,
raise to the pi power, and truncate to an integer, and the
result will be ~R.")

          (defun f (n)
            (values (truncate (expt (- n 17) pi))))

          (defun sentence (n)
            (format nil *pattern* (f n)))

     To count the number of letters:

          (defun letter-count (string)
            (count nil string
              :test #'(lambda (ignore char)
                        (declare (ignore ignore))
                        (alpha-char-p char))))

     Then one loops computing (SENTENCE n) for increasing n until
     the actual count of letters comes out correctly [the first
     column is a trial letter count, the second is the actual
     letter count using the spelling of the function of the trial
     letter count.  Compile everything first!]:

          (do ((i 1 (1+ i))) ()
            (let* ((sentence (sentence i))
                   (n (letter-count sentence)))
              (format t "~D ~D~%" i n)
              (when (= i n)
                (return (values sentence n)))))

          [I deleted much of the output, and did not indent the
           string output below.]

          152 177
          153 161
          154 169
          155 178
          156 156
"Take the number of letters in this sentence, subtract seventeen,
raise to the pi power, and truncate to an integer, and the
result will be five million, four hundred and one thousand, sixty-seven." ;
          156
          Lisp> (letter-count *)    ; How many letters in the string
          156
          Lisp> (f 156)             ; apply the function
          5401067

     The number 5,401,067 is the number that is spelled out in
     the sentence.

     I deleted the output that showed the left column slowly
     increasing until it matched the right column.  If it had
     surpassed the right column without matching, I would have
     tinkered with the sentence to adjust the number of letters
     and then tried again.  The above was slightly different than
     an earlier attempt that hadn't worked.

     Dan