MathGroup Archive 2007

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

Search the Archive

Re: Concatenation of prime factors of numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78641] Re: [mg78599] Concatenation of prime factors of numbers
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 6 Jul 2007 03:17:34 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Attributes[seqFactors] = {Listable};

seqFactors[n_Integer?Positive] :=
  FromDigits[Flatten[
    Table[#[[1]], {#[[2]]}] & /@
     FactorInteger[n]]];

seqFactors /@ Range[2, 16]

{2,3,22,5,23,7,222,33,25,11,223,13,27,35,2222}

seqFactors[Range[2, 16]]

{2,3,22,5,23,7,222,33,25,11,223,13,27,35,2222}


Bob Hanlon

---- Diana <diana.mecum at gmail.com> wrote: 
> Can someone help me with this trick?
> 
> I would like to create the following sequence, based on FactorInteger:
> 
> 2,3,22,5,23,7,222,33,25,11,223,13,27,35,2222, ...
> 
> where each term is the concatenation of the prime factors of n.
> 
> Thanks,
> 
> Diana
> 
> 



  • Prev by Date: Background Color in Tooltip
  • Next by Date: Re: Compiled function changes somehow.
  • Previous by thread: Re: Concatenation of prime factors of numbers
  • Next by thread: Re: Concatenation of prime factors of numbers