MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Numbers and their reversals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53711] Re: [mg53687] Numbers and their reversals
  • From: DrBob <drbob at bigfoot.com>
  • Date: Mon, 24 Jan 2005 03:37:35 -0500 (EST)
  • References: <200501230702.CAA11076@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

Maybe this will help:

fives = Select[Tuples[
     {Range[9], Range[0, 9],
      Range[0, 9], Range[0, 9],
      Range[0, 9]}],
    Reverse[IntegerDigits[
        17*FromDigits[#1]]] ==
      IntegerDigits[
       17*FromDigits[Reverse[
          #1]]] & ]
{{2, 4, 4, 4, 2}, {2, 4, 6, 6,
    2}, {2, 4, 6, 8, 4},
   {2, 6, 6, 4, 2}, {2, 6, 8, 6,
    2}, {4, 8, 6, 4, 2}}

Bobby

On Sun, 23 Jan 2005 02:02:17 -0500 (EST), F. omari <towtoo2002 at yahoo.com> wrote:

>
> i want to investigate the following two equations:
> a * const = z
> a_Reversed * const = z_Reversed
> where a, z, and their reversed form and const are all positive integers
> ie such that:
> 2684 * 17 = 45628
> 4862 * 17 = 82654
> 2986 * 91 = 271726
> 6892 * 91 = 627172
> it happened that many multipliers of 91 have such a property.
> while the multipliers of 17 have only 5 cases in the interval of 1 to 3000
> the following code will investigate the multipliers of 17, to investigate another number just replace 17. and you may increase the interval of investigation. i am sure that my code is an old fashion one, please any other ideas about a more functional code.
> a = Table[i, {i, 1, 3000}]; zR = ""; aR = 0; z = "";
> Do[aR = ToExpression[StringReverse[ToString[a[[i]]]]];
>         z = ToString[a[[i]]*17];
>        zR = StringReverse[ToString[aR*17]];
>        If[zR == z, Print[a[[i]]]], {i, 1, 3000}]
>
> 242
> 484
> 2442
> 2662
> 2684
> regards
>
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Numbers and their reversals
  • Next by Date: Re: Re: PlotLegend not an option for PLot? 5.1
  • Previous by thread: Numbers and their reversals
  • Next by thread: Re: Numbers and their reversals