MathGroup Archive 2005

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

Search the Archive

Numbers and their reversals


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



  • Prev by Date: Re: Preventing Times[x,x] from becoming Power[x,2]
  • Next by Date: Re: Re: Function Fitting To 3D Data
  • Previous by thread: How to make 3d map w/ data?
  • Next by thread: Re: Numbers and their reversals