My Math Forum reverse n

 Number Theory Number Theory Math Forum

October 21st, 2011, 06:07 AM   #21
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: reverse n

Quote:
 Originally Posted by vdrn Thanks! Do you know the source of this formula?
I'm sure he just made it up on the spot, it's the obvious one.

 October 21st, 2011, 06:33 AM #22 Newbie   Joined: Oct 2011 Posts: 15 Thanks: 0 Re: reverse n So is there a way to do this just by plugging in n (without using a_k)?
October 21st, 2011, 06:54 AM   #23
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: reverse n

Quote:
 Originally Posted by vdrn So is there a way to do this just by plugging in n (without using a_k)?
Depends on what you mean by a "way". You could define something like
$f(n,d)=\left{\begin{array}{ll}n&\text{, }d=1\\
(n\bmod10)10^{d+1}+\lfloor n/10^d\rfloor+f\left(\lfloor n/10\rfloor-10^d\lfloor n/10^d\rfloor,d-2\right)&\text{, }d>1\end{array}\right.$

(something like that; the exponents aren't quite right I think) and then what you want is $f(n,\lfloor\log_{10}n+1\rfloor).$ But this amounts to the same thing.

October 21st, 2011, 09:30 AM   #24
Newbie

Joined: Oct 2011

Posts: 15
Thanks: 0

Re: reverse n

Quote:
Originally Posted by CRGreathouse
Quote:
 Originally Posted by vdrn So is there a way to do this just by plugging in n (without using a_k)?
Depends on what you mean by a "way". You could define something like
$f(n,d)=\left{\begin{array}{ll}n&\text{, }d=1\\
(n\bmod10)10^{d+1}+\lfloor n/10^d\rfloor+f\left(\lfloor n/10\rfloor-10^d\lfloor n/10^d\rfloor,d-2\right)&\text{, }d>1\end{array}\right.$

(something like that; the exponents aren't quite right I think) and then what you want is $f(n,\lfloor\log_{10}n+1\rfloor).$ But this amounts to the same thing.
can't you do something like $r(n)=10^{ \lfloor log_{10}(10n) \rfloor -1}(n\bmod 10) + \left(\sum_{i=3}^{\left \lfloor log_{10}(10n) \rfloor \right} \left(n\bmod 10^{i-1}\right)-\left(n\bmod 10^{i-2} \right) \right)+\left(1+0^{ \lfloor log_{10}(10n) \rfloor -1}(-1)\right)\left(\frac{n-\left(n\bmod10^{ \lfloor log_{10}(10n) \rfloor -1}\right)}{10^{ \lfloor log_{10}(10n) \rfloor -1} \right)$
?
I haven't checked it, but you should get the idea.

 October 21st, 2011, 12:59 PM #25 Global Moderator     Joined: Nov 2006 From: UTC -5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms Re: reverse n Sure, or dozens of other equivalent things.
October 21st, 2011, 03:03 PM   #26
Newbie

Joined: Oct 2011

Posts: 15
Thanks: 0

Re: reverse n

Quote:
 Originally Posted by CRGreathouse f(n) is the reverse of the decimal digits of n. What more do you want?
Quote:
 Originally Posted by vdrn generalized expression of what comes after f(n)=
Quote:
Originally Posted by CRGreathouse
Quote:
 Originally Posted by vdrn generalized expression of what comes after f(n)=
Isn't that what I just wrote? If not, explain what you mean by "generalized" and "expression".
So now do you understand what I mean? Maybe there is some language barrier, since english is not my p.language(obviously). Anyway, no need for equivalent version, but a shorter way of writing $r(n)=10^{ \lfloor log_{10}(10n) \rfloor -1}(n\bmod 10) + \left(\sum_{i=3}^{\left \lfloor log_{10}(10n) \rfloor \right} \left(n\bmod 10^{i-1}\right)-\left(n\bmod 10^{i-2} \right) \right)+\left(1+0^{ \lfloor log_{10}(10n) \rfloor -1}(-1)\right)\left(\frac{n-\left(n\bmod10^{ \lfloor log_{10}(10n) \rfloor -1}\right)}{10^{ \lfloor log_{10}(10n) \rfloor -1} \right)$ would be nice (just having to input n to get reversed n).

October 21st, 2011, 07:16 PM   #27
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: reverse n

Quote:
 Originally Posted by vdrn So now do you understand what I mean?
No.

Quote:
 Originally Posted by vdrn Maybe there is some language barrier, since english is not my p.language(obviously).
I don't think so. I think the problem is that you're using terms that don't have precise mathematical descriptions.

October 22nd, 2011, 03:31 AM   #28
Newbie

Joined: Oct 2011

Posts: 15
Thanks: 0

Re: reverse n

Quote:
Originally Posted by CRGreathouse
Quote:
 Originally Posted by vdrn So now do you understand what I mean?
No.

Quote:
 Originally Posted by vdrn Maybe there is some language barrier, since english is not my p.language(obviously).
I don't think so. I think the problem is that you're using terms that don't have precise mathematical descriptions.
That's right. Ok, thanks for your time.

 October 22nd, 2011, 04:07 PM #29 Global Moderator     Joined: Nov 2006 From: UTC -5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms Re: reverse n No problem. Anything else I can do?

 Tags reverse

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post zuba Applied Math 1 December 19th, 2012 02:58 AM ravynware Algebra 0 April 15th, 2012 07:11 PM swtrse Number Theory 2 August 6th, 2009 04:53 AM NumberA Algebra 5 April 19th, 2009 11:03 AM Clox Algebra 2 January 23rd, 2008 12:24 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top