Sheldon Cooper Primes

On the 73rd episode of the Big Bang Theory, Dr. Sheldon Cooper, an astrophysicist portrayed by Jim Parsons (1973hopefully2073) revealed his favorite number to be the sexy prime 73

Sheldon :
The best number is 73.
Why?
73 is the 21st prime number.
Its mirror, 37, is the 12th
and its mirror, 21, is the product of multiplying 7 and 3
… and in binary 73 is a palindrome, 1001001, which backwards is 1001001.”

Leonard : “73 is the Chuck Norris of numbers!”

Sheldon : “Chuck Norris wishes… all Chuck Norris backwards gets you is Sirron Kcuhc!”‘

My question is basically this: Are there any more Sheldon Cooper primes?

But how do I define a Sheldon Cooper Prime? Sheldon emphasizes three aspects of 73

  • It is an emirp with added mirror properties
    (ie, the prime’s mirror is also a prime with position number mirrored)

  • A concatenation of the factors of the position number of the prime yields the prime.

  • Binary representation of the prime is a palindrome

I think having all three properties exist simultaneously in a number is difficult.
So, a prime satisfying the first property is good enough.

So, I define a Sheldon Cooper Prime as an emirp with added mirror properties.

Good Luck finding them 😀

Edit: Please find primes with position numbers >9.
2,3,.. are far too trivial.

Answer

Up to 10,000,000 (currently running until 100,000,000)

  • Emirp with added mirror properties (as defined above): 2,3,5,7,11,37,and73.

  • + Mirror different from original prime:37,and73.

  • + Binary representation of the prime is a palindrome: 73.

  • + A concatenation of the factors of the position number of the prime yields the prime: 73.


Matlab Code

clc
clear

for i = 1:10000000

    % Prime:
    if (isprime(i))
        cont = 1;
    else
        cont = 0;
    end

    % 1. It is an emirp with added mirror properties: 
    if (cont == 1)

        mirror_i = str2double(fliplr(num2str(i)));

        if (isprime(mirror_i))
            cont = 1;
        else
            cont = 0;            
        end

    end

    if (cont == 1)

        p_i  = length(primes(i));

        p_mi = length(primes(mirror_i));

        mirror_p_i = str2double(fliplr(num2str(p_i)));

        if (mirror_p_i == p_mi)
            cont = 1;
            disp(' ')
            disp(' ')
            disp(['------------->>  ',num2str(i)])
            disp(['Satisfies Condition 1:  ',num2str([mirror_i,p_i,p_mi])])
        else
            cont = 0;            
        end

    end

     % 2. Mirror different from original prime:
    if (cont == 1)

        if (i == mirror_i)
            cont = 0;
        else
            cont = 1;
            disp('Satisfies Condition 2')
        end

    end

    % 3. Binary representation of the prime is a palindrome:
    if (cont == 1)

        bin = dec2bin(i);
        mirror_bin = fliplr(num2str(bin));

        if (bin == mirror_bin)
            cont = 1;
            disp(['Satisfies Condition 3:  ',num2str(str2double(bin))])
        else
            cont = 0;
        end

    end

    % 4. A concatenation of the factors of the position number of the prime
    % yields the prime:
    if (cont == 1)

        if (prod(sscanf(num2str(i),'%1d')) == p_i)
            disp('Satisfies Condition 4')
        end

    end

end

Attribution
Source : Link , Question Author : Nick , Answer Author : mzp

Leave a Comment