http://qs321.pair.com?node_id=11130894


in reply to [OT] math fulguration

This rule doesn't seem to work for 3^3 which following this equation would be 3^0 + 3^1 + 3^2 + 1 => 14; the correct answer is 27. Yes, it does work for powers of 2.

Update: Oof -- clearly, my reading comprehension sucks. I never did well on exams. :/

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^2: [OT] math fulguration
by choroba (Cardinal) on Apr 06, 2021 at 14:29 UTC
    I guess the English formula should be fixed with s/ multiplied\K for n-1/ by a-1/, i.e.
    3^3 = 1 + (3 - 1) * (3^0 + 3^1 + 3^2) = 1 + 2 * (1 + 3 + 9) = 1 + 2 * +13 = 1 + 26 = 27
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      Yes -- it's missing a 'multiplied by' in exactly the place you're describing.

      Alex / talexb / Toronto

      Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Re^2: [OT] math fulguration
by hippo (Bishop) on Apr 06, 2021 at 14:26 UTC

    I think you have missed a term. For 33 it should be:

    (3^0 + 3^1 + 3^2) * (3 - 1) + 1 = 27

    HTH.


    🦛