in reply to Intriguing problem; maybe golf?

A recursive solution:
sub c { my$a=pop;$a==1?1:8**($a-1)+c($a-1) }
And a non-recursive one:
sub c { my$a=1;$a+=8**$_ for(1..pop-1);$a }
updates on that last bit of code
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain