Loading ...
Sorry, an error occurred while loading the content.

Primes from permutation of prime digits

Expand Messages
  • zak seidov
    Hi, prime folks, Primes from permutation of prime digits ======================================= For each prime p, define perm(p) = number of permutations of
    Message 1 of 7 , Feb 11, 2009
    • 0 Attachment
      Hi, prime folks,

      Primes from permutation of prime digits
      =======================================

      For each prime p, define perm(p) =
      number of permutations of digits of p which give primes
      (including p itself).
      Some examples:

      perm(2)=1

      perm(1097)=10: ten primes
      {179, 197, 719, 971, 1097, 1709, 1907, 7019, 7109, 7901}
      (note some primes arise from permutations with leading zeroes:
      0179=>179, 0197=>197, etc.)

      perm(1006991)=100: hundred primes
      {11699,11969,19961,...9906101,9910601,9960101}


      perm(12338449)=1000: thousand primes
      {12338449, 12394483,12394843,...,98432413,98433241, 98433421}

      We have the next table of
      minimal primes p with given perm:
      {perm,p)
      {1,2}
      {10,1097}
      {100,1006991}
      {1000,12338449}
      {10000,??}
      {100000,??}
      any1 wish to extend this?
      thx, zak
    • zak seidov
      ... first case of perm(p) 10^4 is perm(100123697)=10042 and of course i mean distinct primes , otherwise perm(11)=2 - curious enough. maximal perm for first
      Message 2 of 7 , Feb 12, 2009
      • 0 Attachment
        --- On Thu, 2/12/09, Maximilian Hasler <maximilian.hasler@...> wrote:

        > From: Maximilian Hasler <maximilian.hasler@...>
        > Subject: Re: [PrimeNumbers] Primes from permutation of prime digits
        > To: zakseidov@...
        > Date: Thursday, February 12, 2009, 8:40 AM
        > --- In primenumbers@yahoogroups.com, zak seidov wrote:
        > > For each prime p, define perm(p) =
        > > number of permutations of digits of p which give
        > primes
        > > (including p itself).
        > (...)
        > > We have the next table of
        > > minimal primes p with given perm:
        > > {perm,p)
        > > {1,2}
        > > {10,1097}
        > > {100,1006991}
        > > {1000,12338449}
        > > {10000,??}
        >
        > The definition does not correspond to the data above.
        >
        > zak(p,d,n)={sum(i=1,(n=#d=Vec(Str(p)))!,ispseudoprime(eval(concat(vecextract(d,numtoperm(n,i))))))}
        >
        > zak(1097)
        > = 10
        >
        > zak(12338449)
        > = 4000
        >
        > Indeed my function counts, according to your definition,
        > the number of
        > permutations of digits yielding primes, including those
        > that just
        > exchange two identical digits, etc.
        >
        > Whereas your data corresponds to the number of distinct
        > primes
        > produced (which may be smaller by some (generalized)
        > binomial factor
        > depending on the number of identical digits).
        >
        > Using your definition & my code the first with
        > perm>10^4 I found
        > (without exhaustive search) is:
        > 11111117 15120
        >
        > Regards,
        > Maximilian

        first case of perm(p)>10^4 is perm(100123697)=10042
        and of course i mean "distinct primes",
        otherwise perm(11)=2 - curious enough.
        maximal perm for first 2*10^7 primes is
        perm(102345697)=30852 (distinct primes!)
        zak
      • Mark Underwood
        ... Interesting. It s surprising to me that the number of odd digits barely outnumbers the number of even digits in these primes with maximum perms. Must be a
        Message 3 of 7 , Feb 13, 2009
        • 0 Attachment
          --- In primenumbers@yahoogroups.com, zak seidov <zakseidov@...> wrote:

          > > > We have the next table of
          > > > minimal primes p with given perm:
          > > > {perm,p)
          > > > {1,2}
          > > > {10,1097}
          > > > {100,1006991}
          > > > {1000,12338449}
          ...
          > > zak(12338449)
          > > = 4000
          > > Using your definition & my code the first with
          > > perm>10^4 I found
          > > (without exhaustive search) is:
          > > 11111117 15120
          ...
          > first case of perm(p)>10^4 is perm(100123697)=10042
          > and of course i mean "distinct primes",
          > otherwise perm(11)=2 - curious enough.
          > maximal perm for first 2*10^7 primes is
          > perm(102345697)=30852 (distinct primes!)
          > zak
          >



          Interesting. It's surprising to me that the number of odd digits
          barely outnumbers the number of even digits in these primes with
          maximum perms. Must be a good reason ...

          Mark
        • Mark Underwood
          ... Scrap that. It s not that surprising to me anymore. :) Mark
          Message 4 of 7 , Feb 13, 2009
          • 0 Attachment
            --- In primenumbers@yahoogroups.com, "Mark Underwood"
            <mark.underwood@...> wrote:
            >

            > Interesting. It's surprising to me that the number of odd digits
            > barely outnumbers the number of even digits in these primes with
            > maximum perms. Must be a good reason ...
            >

            Scrap that. It's not that surprising to me anymore. :)

            Mark
          • David Broadhurst
            I prefer zak(1123465789) = 152526 to zak(1023345679) = 156227 since the former does not invoke leading zeros. David
            Message 5 of 7 , Feb 14, 2009
            • 0 Attachment
              I prefer
              zak(1123465789) = 152526 to
              zak(1023345679) = 156227 since
              the former does not invoke leading zeros.

              David
            • David Broadhurst
              ... Thereafter, 11-digit primes become somewhat memory-intensive, in my simple-minded implementation, using GP s vecsort . Might Zak and/or Maximilian confirm
              Message 6 of 7 , Feb 14, 2009
              • 0 Attachment
                --- In primenumbers@yahoogroups.com, "David Broadhurst"
                <d.broadhurst@...> wrote:

                > I prefer
                > zak(1123465789) = 152526 to
                > zak(1023345679) = 156227 since
                > the former does not invoke leading zeros.

                Thereafter, 11-digit primes become somewhat memory-intensive,
                in my simple-minded implementation, using GP's "vecsort".

                Might Zak and/or Maximilian confirm that
                zak(10123457689) = 1404250
                without duplication of primes, but allowing Zak's leading zeros ?

                David
              • Maximilian Hasler
                ... yes: zak(10123457689) %1 = 2808500 2808500/2 (symmetry factor for exchange of the two 1 s) %2 = 1404250 Maximilian
                Message 7 of 7 , Feb 15, 2009
                • 0 Attachment
                  > Thereafter, 11-digit primes become somewhat memory-intensive,
                  > in my simple-minded implementation, using GP's "vecsort".
                  >
                  > Might Zak and/or Maximilian confirm that
                  > zak(10123457689) = 1404250
                  > without duplication of primes, but allowing Zak's leading zeros ?

                  yes:
                  zak(10123457689)
                  %1 = 2808500
                  2808500/2 \\ (symmetry factor for exchange of the two 1's)
                  %2 = 1404250

                  Maximilian
                Your message has been successfully submitted and would be delivered to recipients shortly.